Phil Hassey - games, tech, web, stuff, biz, and bilge
Phil Hassey as Wolverine
"What kind of
arrogant jerk
has a website like this?"

Archive for the 'languages' Category

language design in 48 hours

Wednesday, September 19th, 2007

I’m a big fan of rapid development. I’m also a big fan of the programming languages that I use … but every now and then I come across a use case where my language of choice just isn’t cutting it. And what’s the only obvious solution? Design my own language in 48 hours!

I like the 48 hour restriction because that means I won’t waste more than one weekend of my life trying this. I honestly believe that the people in charge of the languages I use are doing a great job. It’s just that now and again I have the desire to try and make one myself. And if it turns out to be a waste of time, at least it was only 48 hours :)

I’ll likely be trying to make some language similar to python and lua - with a special focus on making it easy to integrate into C.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

language hangups

Tuesday, September 18th, 2007

I’ve spent a bit of time fooling with javascript this past weekend. It really is okay, but I came across a few scoping gotcha. Scoping defaults to global, so

function fnc1() { a = 5; } fnc1(); alert("a: "+a);

Will show you that a is 5. I’m more used to languages that default to a local scope. To get variables into a local scope in javascript, this example should be written as:

b = null; function fnc2() { var b = 5; } fnc2(); alert("b: "+b);

Will show you that b is null - as expected.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Galcon   Watermelons   Dynamite   The Hairy Chestival
All content of imitation pickles (c) 1999-2008 - Phil Hassey  "we care"