Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Yes still a dream (Score 2) 137

1 99.999765% of car drivers can barely handle 2 dimensions, going flying in 3 dimensions? Not a chance in hell.
2 the FAA will require a pilots license
3 the FAA will require aircraft maintenance. This means 99.999768% of all typical car owners will never be able to own one as they will whine like hungry babies when told they need to spend $8900 to have the engine rebuilt that is working just fine. Yes the FAA requires scheduled engine rebuilding.
4 Parking and FAA flight restrictions means you cant just fly from home to work.

Comment Re:function dictionaries in Python (Score 1) 360

Nice. I use the technique extensively in my code- it's elegant, easy to use, fast and powerful - I personally think it should be in every python coder's toolbox - but for implementing a lookup table for a markup language is one of the most elegant I've seen :) i will certainly be remembering this if I ever need to create a DSL again.

Comment Re:It has its uses (Score 2) 360

That's actually a very similar technique - and its a perfectly valid one, it's also a very FAST one since accessing an array element (or for that matter a dictionary value by key) is an atomic operation that only requires a single CPU instruction. Python making functions first-class object is, effectively, a very elegant way of bringing the capabilities of C's function-pointers into a high-level object oriented language, and a bit easier to work with since you're not (visibly) dealing with pointers since you can address the function by name.

def test( str ):
    print("Hello %s" %str)

test('John') #Calls the function - prints 'Hello John'
mydict = {'X': test} # Address the function, stores it as a value in the dictionary, does not run it
mydict[X]('Mike') #Prints 'Hello Mike'

It is also possible to use a function as the KEY in a dictionary - though I've never seen anybody actually do that and I would be hard pressed to come up with any use-case for doing so.

Comment Re:FSF = not practical (Score 3, Insightful) 149

Stallman has never opposed commercialism - he has no problem with people earning a living - you just shouldn't get to earn money by ripping people off (stealing their freedom is arguably worse than stealing their money - and that's what's happening, it may be cleverly disguised but conjobs always are - they are still fraud).

Comment Re:FSF = not practical (Score 4, Insightful) 149

When he started there was no such thing as an entire operating system of free software and no hardware you could run it on. This exists today - it didn't then. It's not as readily and easily available as it should be - but it exists. And, as he rightfully pointed out, if he had compromised the ideal of that existing - it would still not exist at all. It only exists because he never settled for less than that.

Comment Re:It has its uses (Score 3, Interesting) 360

I would argue that OO remains the best paradigm we have for constructing data presentation - especially when the data represents something that exists in the real world (or a reasonable facsimile as in GUI programming or video-game dev). Functional programming on the other hand - is often the best paradigm we have for data processing, especially big data processing. Use them each in their own domains and break these rules-of-thumb whenever it makes sense to.

Slashdot Top Deals

The opposite of a correct statement is a false statement. But the opposite of a profound truth may well be another profound truth. -- Niels Bohr