--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
--
It's because ruby rots people's brains. It is the programming
language equivalent of high fructose corn syrup -- tasty at first, and
then you get overweight, and can't run fast any more, and anything
healthy seems gross to you.
Javascript might not be healthy, but it's slightly less poisonous.
"Meta-programming", in my experience, is usually a fancy term for
"programming badly".
(We *do* have such a thing in node, it's called "flow control libraries".)
Dominic,
It's because ruby rots people's brains. It is the programming
language equivalent of high fructose corn syrup -- tasty at first, and
then you get overweight, and can't run fast any more, and anything
healthy seems gross to you.
Javascript might not be healthy, but it's slightly less poisonous.
"Meta-programming", in my experience, is usually a fancy term for
"programming badly".
(We *do* have such a thing in node, it's called "flow control libraries".)
Not all flow control libraries make you program badly. However, the
more a library obscures the intent or logic of the programs using it,
the more it should be called "bad".
The reason that I see a corollary here is that metaprogramming, DSLs,
and flow-control often act as a magnet for attention and effort,
dramatically in excess of the value they provide. If you're doing
"metaprogramming", or writing a DSL, or a flow-control library, or a
test framework, I think you should do as little as possible, as fast
as possible, as simply as possible, and get back to real work, and
never ever touch it again. Otherwise it's just make-work.
Not everyone agrees with me on this point, and that's fine :)
Dominic,
It's because ruby rots people's brains. It is the programming
language equivalent of high fructose corn syrup -- tasty at first, and
then you get overweight, and can't run fast any more, and anything
healthy seems gross to you.
Javascript might not be healthy, but it's slightly less poisonous.
"Meta-programming", in my experience, is usually a fancy term for
"programming badly".
(We *do* have such a thing in node, it's called "flow control libraries".)
There are a few reasons. First and foremost, meta-programming has as
many definitions as there are people who don't know what it means.
Second, JavaScript is a functional language, so you don't really need
it even if you knew what it meant.
--
Branko Vukelic
bra...@brankovukelic.com
bra...@herdhound.com
IDEA MACHINE
www.brankovukelic.com
Lead Developer
Herd Hound (tm) - Travel that doesn't bite
www.herdhound.com
Love coffee? You might love Loveffee, too.
loveffee.appspot.com
--
"chain(list, cb)" is one of three functions that the "slide" library
exports. It's 20 lines long (about the right size for a flow-control
utility), does exactly what it looks like, and I hardly ever have to
touch it or look at it. "slide" is so-named because I derived it live
at OakJS, so every piece of it fits on a slide presentation.
I never meant you shouldn't *use* flow-control libraries. What I
meant was simply that every second *spent* on a flow control library
-- whether writing one or figuring out how to use it -- must be viewed
as a cost, and is usually not worth it. I don't spend my time pimping
slide because I don't care if you use it or not. In fact, I'd
slightly rather you didn't, because then you might be tempted to mess
with the code and send me pull requests, and then we'd have to have a
whole conversation about it, when there are much more interesting
problems to solve.
Metaprogramming, in my experience, is similar. Either it's something
you just do, because it happens to be the simplest and most obvious
way to solve a problem and you might not even think to call it
"metaprogramming", or it's something you waste a bunch of time messing
around with, because it's hip and fun and makes you feel smart.
Programs like that are fun to write, but they are seriously
infuriating to use. Every time I have to interact with some silly
DSL, I have to work hard to contain the seething resentment. Isn't it
bad enough that we need to know JavaScript and C and C++ and HTML and
CSS, and all the browser and system quirks, now you're adding *more*
complexity, just to make it *pretty*?
Maybe this is the part where I shake my cane at the ruby kids on my
lawn, but that kind of thing just doesn't seem very interesting to me.
Programs that solve a real problem with an elegant api, now *that's* exciting.
On Sun, Oct 2, 2011 at 05:02, Bruno Jouhier <bjou...@gmail.com> wrote:
> "Never ever touch it again". I would not be that strict. You may have
> to fix edge cases, optimize, etc. As long as this does not change the
> usage, this is fine.
I've fixed a few typos in slide. But that's about it.
On Sat, Oct 1, 2011 at 15:40, Stewart Mckinney <lord...@gmail.com> wrote:
> namely, blocks and "method_missing?" - with a large emphasis on
> method_missing?.
ES-Harmony adds both features. :’(
Oh, really? I thought it was just a matter of minor details at this
point. Have there been new developments?
Proxy objects are a bit unfortunate, imo, but I guess if you want to
really emulate a DOM in JS (which is regrettably necessary in some
cases), they're necessary.
On Sun, Oct 2, 2011 at 17:37, Dean Landolt <de...@deanlandolt.com> wrote:Oh, really? I thought it was just a matter of minor details at this
>> > namely, blocks and "method_missing?" - with a large emphasis on
>> > method_missing?.
>>
>> ES-Harmony adds both features. :’(
>
> Blocks ain't in yet.
point. Have there been new developments?
Proxy objects are a bit unfortunate, imo, but I guess if you want to
really emulate a DOM in JS (which is regrettably necessary in some
cases), they're necessary.
--
The arrow should point left for a return.
The "just make your editor do it for you" argument is not very
convincing. *Having* to use vim means that it's harder to discuss
programs online, which is where a lot of highly interesting
code-writing actually happens.
Programming languages ought to be limited to the characters on
keyboards used by programmers (ie, latin characters and common
punctuation. Blah blah chauvinism, I know, but that's how the
demographics are today.)
ƒ and ← are cute, but a pain to type.
The "just make your editor do it for you" argument is not very
convincing. *Having* to use vim means that it's harder to discuss
programs online, which is where a lot of highly interesting
code-writing actually happens.
Programming languages ought to be limited to the characters on
keyboards used by programmers (ie, latin characters and common
punctuation. Blah blah chauvinism, I know, but that's how the
demographics are today.)
--
I find that I can very quickly read code and identify functions within
it because the word 'function' is more than one or two characters and
jumps out at me because it's green on black. If it was just one
character, no matter which character, it would be much harder to
instantly spot a function hiding in a chunk of code. One-character
keywords will be hard to spot in most colour schemes.
Faced with your earlier example and no syntax highlighting, to me it's
close to six and half a dozen. Add syntax highlighting to the mix and
I actually find the lengthier example easier to read and comprehend.
--
Martin Cooper
this thread is swelling nicely!whether or not a language uses function a florin, --> or whatever else is nearly completely unimportant with respect to how useful the language actually is.
you could always get your editor to abbreviate function to florin and return to <--, etc. or whatever makes you feel clever, without having to convince anyone else that it's a good idea.personally, I'm against changing js at all.
It's only this good on accident,
and it's better than all those other languages for being smaller.
make faster/smarter interpreters, but it's impossible to make rational decisions about what "better" syntax is. so just leave it.
ƒ , # , whatever you replace "function" with should follow some sane rules:1. Don't rely on implementation / utf8 bom: aka notepad.exe better not barf.2. It should be easily accessible via the keyboard somehow rather than requiring text macros or alt+1337 etc. Changing keyboard setting on an application level may be fine (APL) but doing it globally so that google/bing/etc. quick lookups means swapping back is unacceptable. Creating key mappings is fine and dandy, but your operating system better offer a way to move that to new machines easily for people picking it up (not all of us like the VIM / EMACS way when we also want to be able to type).3. It should be at least as readable as "function"; # has connotations both in generic symbolism and in programming.4. It should be a sane unicode symbol, looking up "florin" is not what the person is going to do when they see its talking about a function and go to the character map (seriously, why do we even need to go to the character map?). Most unicode fonts don't even support florin or the function symbol ( http://www.fileformat.info/info/unicode/char/2394/index.htm ) so we are stuck with programmer fonts only (which most do not support these anyway).
5. You will have to convince people that for all these problems it makes it not just more readable; but also saves time (alt+1337 != time saved, basically anything with a keypress distance bigger than 1 from the home row will be a hard sell), because it already is readable.
I personally find arguments like this to be about as logical as: math uses a single letter for variables, we can too!... Symbols distinguishing programming language constructs from ascii have traditionally been ignored and the existing ascii based languages are the convention for computing. Math has different conventions and its own set of troubles with readability and writability due to usage of symbols. While there may be a desire for a shortened syntax, the need for a keyword in a language is going to have trouble if it goes outside of ascii (unless you go all the way and provide an IDE like APL).
--
Erm. I think you'll find you can't, um, use florins in string
literals in florinscript.
That's probably a bug.
So.