Why aren’t design patterns added to the languages constructs?
Recently I was talking with a colleague who mentioned that his company was working on adding the MVC design pattern as a PHP extension.
What do you call “X <= $foo <= Y" comparison?
While writing a Perl statement like if ( $foo >= X && $foo <= Y )
yet again, I wondered why many programming languages do not support the more comfortable form if ( X <= $foo <= Y )
and what this is called. I came up with “3-legged comparison” but no results when searching for it. By the way there is also the “element-of-set” form if ( $foo in X..Y )
which I only consider more readable when provided via a short keyword.
What’s the progress on Haskell records?
Recently I stumbled once again on the issues of Haskell’s records, in particular the uniqueness of field names. (It’s a pain…)
Are non Turing-complete languages considered programming languages at all? [closed]
Closed 9 years ago.
Is function overloading in general considered Evil? [closed]
It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago. Recently I found about two new programming languages(Vala […]
When to import names into the global namespace? (using x::y, from x import y etc.)
I’ve been programming in various languages for about 10 years now. And I still haven’t figured out when it is a good idea to import something into the global namespace (using x::y
in C++, from x import y
in Python etc.), so I hardly ever do it.
Is is acceptable to create mediocre code now in preparation for new language features? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]
Why does JavaScript count array lengths by the last index?
JavaScript seems to calculate the array length property by the number of the last index in the array rather than counting the number of items in the array. Example:
Writing a Compiler Compiler – Insight on Use and Features
This is part of a series of questions which focuses on the sister project to the Abstraction Project, which aims to abstract the concepts used in language design in the form of a framework. The sister project is called OILexer, which aims to construct a parser from grammar files, without the use of code injection on matches.
Java language constructs to enforce design decisions
What constructs in OOP languages (specifically Java) allow you to enforce design decisions and intent?