Beauty Is in the Eye of the Beholder
Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Jonathan Allen on May 15, 2009
D is a relatively new language that, like ObjectiveC, tries to address some of the more serious problems in C++. From our interview with Cristian Vlasceanu,
In many ways D encourages the "right" behavior. For example, in C and C++, if you write "int i;" the variable is uninitialized. To do the "right thing", the programmer needs to type extra keystrokes as in "int i = 0;" but D works the other way around: "int i;" safely sets the variable to a default value (that in this case is zero). To make it uninitialized you have to spend extra effort and type "int i = void;" expressing that the uninitialized variable is intentional and not due to laziness.
D.NET is an experimental port of the D language to the Common Language Runtime. It consists of two parts, a front-end and a back-end component. The front-end component handles the parsing of source code and the generation of abstract syntax trees. The back-end compiler takes that and generates the actual machine code, or in this case IL code. While the source for both are available on CodePlex, only the back-end is maintained there. The front-end component is straight out of the D 2.0 Programming Language Compiler.
A word of caution,
The back-end code is not of production quality, it is intended for research and educational purposes. The D Programming Language is a fairly complex language, and non-trivial features such as TLS and closures make it an interesting case study for generating IL code.
Using Drools? See what you're missing! Get the Power of Drools with the Assurance of Red Hat
When I learned about D (and wrote a teeny bit of code with it) a few years back, it looked extremely interesting. Here was a language that was appropriate for native/system coding but that had features of more modern environments compared to C++, like garbage collection, unit testing and design by contract.
I'm not sure that a .NET targeted compiler is quite as compelling when compared to C#, but it would be cool to see D take off for cases when native code is more appropriate.
Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.
John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.
Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.
Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.
Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?
Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.
Chris Richardson shows how he ported a relational database to three NoSQL data stores: Redis, Cassandra and MongoDB.
Jean Tabaka challenges the audience to reflect on what Agile practices they are employing, how they are using them, ending with the questions “Why have their organization chosen to go Agile?
1 comment
Watch Thread Reply