In both of those cases, it is fundementally not possible for it to work properly if you didn't trust the firmware or the cdrom. But this case is different: if Mozilla disabled the DRM, the site would still work properly. Firefox has an option to not let Javascript alter the context menu. If Google circuments this, then this is at least a bug, even if you don't consider it a security issue.
They didn't forge the IDs; they had valid immigration documentation and got their ID cards, not faked, as a non-driver identification. RFID chips (and the new immigration measures in place) wouldn't've done a thing.
Did you read the bug? Because if you did, you would know that all versions of IE and NN have had this bug too. It's a new security policy, not exactly a bug. And all the bug can do is tell if files exist, not read them.
Re:python's list processing rules
on
Dive Into Python
·
· Score: 2, Informative
There are good reasons why Python is great, but this isn't one of them. Scheme can do this much more tersely. for the first example,
l = l[1:]
This could be done in HTDP's Scheme dialect as
(rest l)
(that didn't do the same thing, but in good Schemely style, you probably wouldn't be updating a variable for something like that). The Python version would be O(n), while the Scheme version would be O(1). This is because Python uses arrays and annoys the rest of the programmer world calling them lists. Scheme, OTOH, uses linked lists, where the rest operation doesn't require copying most of the structure like Python does.
For the second example, the list comprehension, the Python version
l = [do_something(x) for x in l]
is again longer than the scheme version (which I'm leaving out assignment for):
(map do-something l)
Don't like the parens? You might want to check out Haskell, which is similar to Scheme in many respects but has significant indentation and list comprehensions. Python is very un-unique in its ability to do these things you've listed.
Which is unnecessary in Python. The indentation is always correct, and that's that. Well, the indentation is always meaningful.
The indentation is always meaningful, but it's not always correct, if the indentation is incorrect, it's an error. Here's an example: you want to copy code from some other program. The code in the other program is in an if statement in a function, indented 2 levels, but you want it to just be in a function, indented one level. You copy and paste the code, and the indentation is wrong no matter what language you're using. Innocently, you try to run it, but you get an indentation error. But in a language with explicit delimiters, it will just work. Isn't that DWIM? So then, you want to make the program look better, no matter which language you're using. In the language with explicit delimiters, emacs can tell where to indent because the delimiters are good clues, but without explicit delimiters, emacs has no idea where to indent the python code and you have to reindent it manually. Emacs might have commands to make it so you can un/indent a block in just 2 keystrokes, but you still have to do it all manually, putting the work of emacs on the programmer. I don't see how this is good.
Note that with a brace/delimiter oriented language, you often have to manually insert/delete delimiters...
You obviously don't have much experience using brace/delimeter oriented languages. If whitespace means nothing, the emacs or vi mode pretty much always handles indentation for you, with a single commmand to autoindent the whole file. With Python, you have to manually choose the indentation. I'm not saying the Python version is bad, it's definitely acceptable, you just can't say that it's more automatic, because the non-Python version is more automatic.
I have no idea what an interactive interpreter has to do with automatic indentation; most new languages have it, and most new languages don't have signifcant indentation.
That is a straw-man argument. Java isn't just more verbose than Perl; it's more verbose than just about everything short of Ada. Take the extremely simple example of a mutable record with 2 fields (we'll make them integers for this example). Here's how it might be done in Java: class TheRecord {
private int first;
private int second;
public int getFirst() {
return first;
}
public int getSecond() {
return second;
}
public int setFirst(int value) {
first = value;
return value;
}
public int setSecond(int value) {
second = value;
return value;
} } In other languages, this would be much shorter than the 18 lines required to do that in Java. Take, for example, the scheme version: (define-struct the-record (first second)) (it's not restricted to ints, but if you wanted it to be statically type-checked and you have bigloo, you can change it to (define-struct the-record (first::int second::int)), which is still much shorter.) all of the getters and setters are automatically generated, and it was all only one line! Nevertheless, the Scheme version is perfectly readable provided you know what the define-struct macro does (for Java, you just as much have to know what the class keyword does, so...). What could be cooler than reducing 18 lines into a perfectly legible 1 line? I think instead of asking why Java is uncool, we should ask why Scheme is uncool. Daniel Ehrenberg
There already is a lot of pharmaceutical development done with public money; it's just that much of it is sold and/or given to private corporations. But there are still some problems with developing everything publically:
a) There might not be as much innovation. Often, innovation is in the form of creating new markets, which some may consider bad, but I don't see what's bad about it in this context. Creating new markets might be in the form of making drugs for things like ADD and depression. Although these are horribly overdiagnosed, some people (like me, at least I think so) need medicine for this, and now they have it because drug companies made new markets. b) There is less incentive to be efficient. Although the Free Market's drive to maximize profit makes prices as high as possible, it also makes things efficient internally. When the government does something like this, they often have oversized budgets and poorly defined goals. When forced to work efficiently, as businesses are, they can make more things at a lower cost.
Not to say that you're a communist, but I find that open-source advocates tend to be a little over-critical of the free market. The solution doesn't lie in making everything "public", but in weakening patents (eg, in this case, making them last shorter).
I can't believe this has a 5 rating; it's obviously just an advertizement for Ruby. Before I begin rebutting what the Anonymous Coward wrote, line by line, I'd like to say that I'm *not* a Pythonista, my favorite language is Kogut, or Scheme for real development.
"Ruby is basically a superset of Python and Perl." I have no idea where that statement came from. Ruby is a completely different paradigm than Python or Perl, with completely different syntax.
"'len(str)' instead of 'str.len()'" For historical reasons, really, but it can still be overloaded with the __len__ method.
"'[f for f in n if f 4]' instead of something like 'n.each { |f| f4 }'" You find the Python way less readable? It only has one more character, and I'm not sure they actually do the same thing. Either the Python version should be changed to [f4 for f in n] or the Ruby version should be changed to n.select { |f| f4} or something like that. Either way, now the Python version has fewer characters. I can read both of them easily. I prefer the Ruby approach slightly, because it's more flexible, but you can't say the Python way looks bad.
"If you ever programmed Perl..." Well, I can't really defend Perl, but I don't see why you're doing UNIVERSAL:: when you'd usually just import that and have the line be isa $val, "FooClass" which fits fairly well into the Perl syntax. Besides, when Perl6 comes out in 2025, they should have a real object model.
"If you like adding your own methods to base types" I have to admit, this is a major shortcomming of Python, but you can do this in Perl5 if you're using multimethods and also in Perl6 whether or not you're using them. Also, most functional languages can do this too, and have the functions be scoped in a module.
"If you like distributed programming you'll get a kick out of DRb" I'm supposed to choose a language because there's this one library that it has? Is there something in Ruby that makes it the only language capable of wielding the awesome power of DRb?
"Do you need extended your languages with external C libraries? You will positively, absolutely shit yourself three times when you try out Ruby/DL, which lets you extend Ruby with arbitrary C libraries at run time without any compiling or setup." Using C without compiling? What the hell? For making it easier to use C, nothing beats being able to freely embed C code and be able to compile programs the same way you always do.
"If you wonder why Java takes 3-5 lines of code just to parse an XML file or set up a loop you will find Ruby quite a change. And REXML is the most lightweight easy to use XML parser I've ever used (PHP5's new parser comes *close*.. but PHP is not Ruby)." And REXML, like DRb, is so powerful that no other language can do anything like it? Have you compared REXML in Ruby with SXML in Scheme? It's really easy with SXML.
"If you like writing code FAST without worrying about heavy syntax or arbitrary design choices, you'll like Ruby." What are you talking about? Syntax is completely a personal preference issue, and not everybody likes Ruby syntax the best. I personally like sexprs and Kogut syntax (which is kinda like a cross between C and ML), even though you would probably say they're really ugly. Design decisions are rarely arbitrary, and if you would name one, then I'll refute it. Everything has a reason.
"If you like passing anonymous code blocks to your functions like SmallTalk, you'll get a kick out of Ruby" I have to agree with you here, except it's really annoying how in order to make a block that can be stored in a variable, you have to write lambda, and then to use it you have to prefix it with an ampersand. The functional way of just sending an ordinary function as an argument (and making convienent syntax for that) is much better, IMHO
"If you are into agile programming and merciless refactoring, you'll like Ruby" I'm not really into meaningless buzzwords like "agile programming", and I don't se
Nobody's saying more energy is being created; it was always that it's more efficient. Normal cars loose more energy to heat, but hybrid cars can recollect some energy that would otherwise be lost and use it for motion. This has nothing to do with breaking conservation of energy; it's all about fuel efficiency.
Daniel Ehrenberg
My dad bought a Honda Civic Hybrid, and even though it only gets 40 mi/g, it's still very efficient and can usually run about 500 miles on a tank, more than any other car my family has had. I don't see what the big fuss is; the EPA consistently overestimates all cars and hybrids are no exception.
As WINE comes to be able to emulate more and more of the Windows ABIs, do you think there will be any patent issues in the future? Currently, it seems like Microsoft doesn't see WINE as much of a threat, but as soon as WINE becomes a viable replacement for running Windows applications, it could sue WINE for patent infringement.
This is what I hate about slashdot: the rampant agism. Everyone thinks that a computer user who's between the ages of 12 and 15 is automatically a script kiddie. That is just completely false. I don't know the first thing about being a script kiddie, only about programming and teaching people to program (when it comes to computers, that is). This is really annoying how everyone prejudices people like me (I'm 14) to be arrogant, stupid crackers.
What's wroing with prototype OO? You can use it in a completely class-based way if you wish. Prototyping only allows more flexibility. Many things in OO languages, such as Python exceptions, require a hierarchy of objects so they use classes. But this a hack; exceptions are objects, not classes. Although prototype-oriented languages haven't been used extensively in buisness contexts, neither have languages with type systems more advanced than Algol because the jump to a language that's not directly decendent from C is too great (unless it's from Microsoft, but for Microsoft they'd switch to assembly if it was marketed properly). Compared to FP, prototypes are almost completely unused in academia or any other sort of "ivory tower". What makes it difficult for inhreritance management?
Daniel Ehrenberg
I learned very functional, very OO, and low-level procedural languages around the same time (around a year span; I don't think a year is enough time to mold your brain to a single paridigm, is it?), and I'm still learning. From what I've seen, you can't use one paradigm for everything. My first language was TI-83 calculator basic, and while it's extremely low-level, I did much better on it than I would on Haskell or Io (a language where everything is an object, but there are no classes).
Later, I tried to learn a number of other languages but Python, a non-functional language, was the only one I could learn. Python doesn't have any gotos and doesn't in any way resemble calculator basic, but it's still very good for beginners. Later, I learned Haskell, which seemed very flexible and high-level but I/O was a whole new language, and very difficult to use at that. Haskell was the best for math and theoretical stuff, though. Its use of static typing while also having generic functions and parametric polymorphism helped avoid many bugs. Lazy evaluation is great but sometimes it can be hard to grasp the flow of a program.
I also learned Io, a language where everything is an object and a prototype. Unlike something like Java, which some advocates of Functional, procedural, or "table-oriented" programming think all OO languages are like, there is no difference between classes and objects, anything about objects can be changed at runtime, and not everything has to be put in objects. Io and other object-oriented programming languages are in some cases better for larger projects, where you might otherwise need to resort to using variable prefixes or internal use of a module system within a module in order to prevent name colision. There are also times when in defining a datatype in a functional language, it seems like it would be more useful to have mutable variables, something which object orientation handles nicely, even if sometimes variables are mutated when new ones should be made.
It would really be inappropriate to say that functional programming is always better or object orientation is always better. Depending on the situation, you need to choose which pardigm is best.
Wikipedia wasn't supposed to be slashdotted they actually set up the servers. We discussed this on the mailing list to death.
Daniel Ehrenberg, aka LDan
I hate when people throw around the term 'FUD'. Understandably, he just didn't understand Perl, since it isn't that easy for most Python programmers to understand.
I think Perl is pretty interesting because, somehow, the creators have managed to combine the disadvantages of weak and manifest typing. First, due to weak typing within scalars (a term which is completely cryptic unless you know Perl), many things happen unlike you'd think they would (such as "0" == "0.0" returning true), requiring special operators on strings and such. This makes the language hugely overcomplicated (or "expressive", if you like to think of it that way). But then, if you have a vector or hash (also cryptic terms), you need to know that because each of the three main types, scalars, vectors, and hashes, must be prefixed on *every* reference. This is even worse than static typing in a language like C. Unnecessary variable prefixes combined with extremely weak typing make Perl a terrible language for new users.
In Python, lists, tuples and dictionaries (terms from English) are much easier to use. Instead of requiring a prefix on every reference, the object is just created and then you can reference it without a prefix. And references are not necesary due to Python's linking model. Here are some examples of using Python's data types versus Perl's.
I'll let you choose which one is more legible and intuitive. In Python, you don't have to worry about whether things are scalars, hashes, references, or whatever, but if you think that's more readable, then that's fine.
I've seen some of those types of ads already. Almost all of them require IE or Flash. If you don't want to pay so much, switch to Mozilla Firebird and don't get Flash.
What are you talking about? For non-technical work, Linux is just as easy as Windows, as long as it is already installed (it causes problems for new users in both cases). I set my mom up on Linux (with GNOME) two months ago and it's no more difficult than before. All she knows is to click on the fire icon (mozilla firebird) on the top bar (it's set up to be somewhat like a classic mac) and then type 'yahoo mail' into the text bar that will pop up (address bar). This is actually slightly easier than typing mail.yahoo.com like before. Either way, she knows nothing about computers (except that she's using Linux), but it's not more difficult than before.
Daniel Ehrenberg
In both of those cases, it is fundementally not possible for it to work properly if you didn't trust the firmware or the cdrom. But this case is different: if Mozilla disabled the DRM, the site would still work properly. Firefox has an option to not let Javascript alter the context menu. If Google circuments this, then this is at least a bug, even if you don't consider it a security issue.
They didn't forge the IDs; they had valid immigration documentation and got their ID cards, not faked, as a non-driver identification. RFID chips (and the new immigration measures in place) wouldn't've done a thing.
Did you read the bug? Because if you did, you would know that all versions of IE and NN have had this bug too. It's a new security policy, not exactly a bug. And all the bug can do is tell if files exist, not read them.
There are good reasons why Python is great, but this isn't one of them. Scheme can do this much more tersely. for the first example,
l = l[1:]This could be done in HTDP's Scheme dialect as
(rest l)(that didn't do the same thing, but in good Schemely style, you probably wouldn't be updating a variable for something like that). The Python version would be O(n), while the Scheme version would be O(1). This is because Python uses arrays and annoys the rest of the programmer world calling them lists. Scheme, OTOH, uses linked lists, where the rest operation doesn't require copying most of the structure like Python does.
For the second example, the list comprehension, the Python version
l = [do_something(x) for x in l]is again longer than the scheme version (which I'm leaving out assignment for):
(map do-something l)Don't like the parens? You might want to check out Haskell, which is similar to Scheme in many respects but has significant indentation and list comprehensions. Python is very un-unique in its ability to do these things you've listed.
Daniel EhrenbergWhich is unnecessary in Python. The indentation is always correct, and that's that.
Well, the indentation is always meaningful.
The indentation is always meaningful, but it's not always correct, if the indentation is incorrect, it's an error. Here's an example: you want to copy code from some other program. The code in the other program is in an if statement in a function, indented 2 levels, but you want it to just be in a function, indented one level. You copy and paste the code, and the indentation is wrong no matter what language you're using. Innocently, you try to run it, but you get an indentation error. But in a language with explicit delimiters, it will just work. Isn't that DWIM? So then, you want to make the program look better, no matter which language you're using. In the language with explicit delimiters, emacs can tell where to indent because the delimiters are good clues, but without explicit delimiters, emacs has no idea where to indent the python code and you have to reindent it manually. Emacs might have commands to make it so you can un/indent a block in just 2 keystrokes, but you still have to do it all manually, putting the work of emacs on the programmer. I don't see how this is good.
Note that with a brace/delimiter oriented language, you often have to manually insert/delete delimiters...
You obviously don't have much experience using brace/delimeter oriented languages. If whitespace means nothing, the emacs or vi mode pretty much always handles indentation for you, with a single commmand to autoindent the whole file. With Python, you have to manually choose the indentation. I'm not saying the Python version is bad, it's definitely acceptable, you just can't say that it's more automatic, because the non-Python version is more automatic.
I have no idea what an interactive interpreter has to do with automatic indentation; most new languages have it, and most new languages don't have signifcant indentation.
Daniel Ehrenberg
That is a straw-man argument. Java isn't just more verbose than Perl; it's more verbose than just about everything short of Ada. Take the extremely simple example of a mutable record with 2 fields (we'll make them integers for this example). Here's how it might be done in Java:
class TheRecord {
private int first;
private int second;
public int getFirst() {
return first;
}
public int getSecond() {
return second;
}
public int setFirst(int value) {
first = value;
return value;
}
public int setSecond(int value) {
second = value;
return value;
}
}
In other languages, this would be much shorter than the 18 lines required to do that in Java. Take, for example, the scheme version:
(define-struct the-record (first second))
(it's not restricted to ints, but if you wanted it to be statically type-checked and you have bigloo, you can change it to (define-struct the-record (first::int second::int)), which is still much shorter.)
all of the getters and setters are automatically generated, and it was all only one line! Nevertheless, the Scheme version is perfectly readable provided you know what the define-struct macro does (for Java, you just as much have to know what the class keyword does, so...). What could be cooler than reducing 18 lines into a perfectly legible 1 line? I think instead of asking why Java is uncool, we should ask why Scheme is uncool.
Daniel Ehrenberg
There already is a lot of pharmaceutical development done with public money; it's just that much of it is sold and/or given to private corporations. But there are still some problems with developing everything publically:
a) There might not be as much innovation. Often, innovation is in the form of creating new markets, which some may consider bad, but I don't see what's bad about it in this context. Creating new markets might be in the form of making drugs for things like ADD and depression. Although these are horribly overdiagnosed, some people (like me, at least I think so) need medicine for this, and now they have it because drug companies made new markets.
b) There is less incentive to be efficient. Although the Free Market's drive to maximize profit makes prices as high as possible, it also makes things efficient internally. When the government does something like this, they often have oversized budgets and poorly defined goals. When forced to work efficiently, as businesses are, they can make more things at a lower cost.
Not to say that you're a communist, but I find that open-source advocates tend to be a little over-critical of the free market. The solution doesn't lie in making everything "public", but in weakening patents (eg, in this case, making them last shorter).
Daniel Ehrenberg
I can't believe this has a 5 rating; it's obviously just an advertizement for Ruby. Before I begin rebutting what the Anonymous Coward wrote, line by line, I'd like to say that I'm *not* a Pythonista, my favorite language is Kogut, or Scheme for real development.
"Ruby is basically a superset of Python and Perl."
I have no idea where that statement came from. Ruby is a completely different paradigm than Python or Perl, with completely different syntax.
"'len(str)' instead of 'str.len()'"
For historical reasons, really, but it can still be overloaded with the __len__ method.
"'[f for f in n if f 4]' instead of something like 'n.each { |f| f4 }'"
You find the Python way less readable? It only has one more character, and I'm not sure they actually do the same thing. Either the Python version should be changed to
[f4 for f in n]
or the Ruby version should be changed to
n.select { |f| f4}
or something like that. Either way, now the Python version has fewer characters. I can read both of them easily. I prefer the Ruby approach slightly, because it's more flexible, but you can't say the Python way looks bad.
"If you ever programmed Perl..."
Well, I can't really defend Perl, but I don't see why you're doing UNIVERSAL:: when you'd usually just import that and have the line be
isa $val, "FooClass"
which fits fairly well into the Perl syntax. Besides, when Perl6 comes out in 2025, they should have a real object model.
"If you like adding your own methods to base types"
I have to admit, this is a major shortcomming of Python, but you can do this in Perl5 if you're using multimethods and also in Perl6 whether or not you're using them. Also, most functional languages can do this too, and have the functions be scoped in a module.
"If you like distributed programming you'll get a kick out of DRb"
I'm supposed to choose a language because there's this one library that it has? Is there something in Ruby that makes it the only language capable of wielding the awesome power of DRb?
"Do you need extended your languages with external C libraries? You will positively, absolutely shit yourself three times when you try out Ruby/DL, which lets you extend Ruby with arbitrary C libraries at run time without any compiling or setup."
Using C without compiling? What the hell?
For making it easier to use C, nothing beats being able to freely embed C code and be able to compile programs the same way you always do.
"If you wonder why Java takes 3-5 lines of code just to parse an XML file or set up a loop you will find Ruby quite a change. And REXML is the most lightweight easy to use XML parser I've ever used (PHP5's new parser comes *close*.. but PHP is not Ruby)."
And REXML, like DRb, is so powerful that no other language can do anything like it? Have you compared REXML in Ruby with SXML in Scheme? It's really easy with SXML.
"If you like writing code FAST without worrying about heavy syntax or arbitrary design choices, you'll like Ruby."
What are you talking about? Syntax is completely a personal preference issue, and not everybody likes Ruby syntax the best. I personally like sexprs and Kogut syntax (which is kinda like a cross between C and ML), even though you would probably say they're really ugly. Design decisions are rarely arbitrary, and if you would name one, then I'll refute it. Everything has a reason.
"If you like passing anonymous code blocks to your functions like SmallTalk, you'll get a kick out of Ruby"
I have to agree with you here, except it's really annoying how in order to make a block that can be stored in a variable, you have to write lambda, and then to use it you have to prefix it with an ampersand. The functional way of just sending an ordinary function as an argument (and making convienent syntax for that) is much better, IMHO
"If you are into agile programming and merciless refactoring, you'll like Ruby"
I'm not really into meaningless buzzwords like "agile programming", and I don't se
You do realise that hydrogen cars will all be hybrids, right? Daniel Ehrenberg
Nobody's saying more energy is being created; it was always that it's more efficient. Normal cars loose more energy to heat, but hybrid cars can recollect some energy that would otherwise be lost and use it for motion. This has nothing to do with breaking conservation of energy; it's all about fuel efficiency. Daniel Ehrenberg
My dad bought a Honda Civic Hybrid, and even though it only gets 40 mi/g, it's still very efficient and can usually run about 500 miles on a tank, more than any other car my family has had. I don't see what the big fuss is; the EPA consistently overestimates all cars and hybrids are no exception.
Daniel Ehrenberg
As WINE comes to be able to emulate more and more of the Windows ABIs, do you think there will be any patent issues in the future? Currently, it seems like Microsoft doesn't see WINE as much of a threat, but as soon as WINE becomes a viable replacement for running Windows applications, it could sue WINE for patent infringement.
Daniel Ehrenberg
This is what I hate about slashdot: the rampant agism. Everyone thinks that a computer user who's between the ages of 12 and 15 is automatically a script kiddie. That is just completely false. I don't know the first thing about being a script kiddie, only about programming and teaching people to program (when it comes to computers, that is). This is really annoying how everyone prejudices people like me (I'm 14) to be arrogant, stupid crackers.
Daniel Ehrenberg, aka LittleDan
Well, Mozilla prompts you before installing anything, so that eliminates most insecurities.
What's wroing with prototype OO? You can use it in a completely class-based way if you wish. Prototyping only allows more flexibility. Many things in OO languages, such as Python exceptions, require a hierarchy of objects so they use classes. But this a hack; exceptions are objects, not classes. Although prototype-oriented languages haven't been used extensively in buisness contexts, neither have languages with type systems more advanced than Algol because the jump to a language that's not directly decendent from C is too great (unless it's from Microsoft, but for Microsoft they'd switch to assembly if it was marketed properly). Compared to FP, prototypes are almost completely unused in academia or any other sort of "ivory tower". What makes it difficult for inhreritance management? Daniel Ehrenberg
Umm... JavaScript is for small scripts. You're proving his point. But there is Mozilla, written in OO Javascript.
Daniel Ehrenberg
I learned very functional, very OO, and low-level procedural languages around the same time (around a year span; I don't think a year is enough time to mold your brain to a single paridigm, is it?), and I'm still learning. From what I've seen, you can't use one paradigm for everything. My first language was TI-83 calculator basic, and while it's extremely low-level, I did much better on it than I would on Haskell or Io (a language where everything is an object, but there are no classes).
Later, I tried to learn a number of other languages but Python, a non-functional language, was the only one I could learn. Python doesn't have any gotos and doesn't in any way resemble calculator basic, but it's still very good for beginners. Later, I learned Haskell, which seemed very flexible and high-level but I/O was a whole new language, and very difficult to use at that. Haskell was the best for math and theoretical stuff, though. Its use of static typing while also having generic functions and parametric polymorphism helped avoid many bugs. Lazy evaluation is great but sometimes it can be hard to grasp the flow of a program.
I also learned Io, a language where everything is an object and a prototype. Unlike something like Java, which some advocates of Functional, procedural, or "table-oriented" programming think all OO languages are like, there is no difference between classes and objects, anything about objects can be changed at runtime, and not everything has to be put in objects. Io and other object-oriented programming languages are in some cases better for larger projects, where you might otherwise need to resort to using variable prefixes or internal use of a module system within a module in order to prevent name colision. There are also times when in defining a datatype in a functional language, it seems like it would be more useful to have mutable variables, something which object orientation handles nicely, even if sometimes variables are mutated when new ones should be made.
It would really be inappropriate to say that functional programming is always better or object orientation is always better. Depending on the situation, you need to choose which pardigm is best.
Daniel Ehrenberg
Wikipedia is cluttered with disclaimers saying it shouldn't be trusted, so I doubt this will happen if this is not changed.
Daniel Ehrenberg, aka LDan
Wikipedia wasn't supposed to be slashdotted they actually set up the servers. We discussed this on the mailing list to death. Daniel Ehrenberg, aka LDan
Why wouldn't you want to use a mouse? That's what a GUI is for.
Stability and awesome user interface in Windows? The lack of those were the main reasons I switched to Linux.
I hate when people throw around the term 'FUD'. Understandably, he just didn't understand Perl, since it isn't that easy for most Python programmers to understand.
I think Perl is pretty interesting because, somehow, the creators have managed to combine the disadvantages of weak and manifest typing. First, due to weak typing within scalars (a term which is completely cryptic unless you know Perl), many things happen unlike you'd think they would (such as "0" == "0.0" returning true), requiring special operators on strings and such. This makes the language hugely overcomplicated (or "expressive", if you like to think of it that way). But then, if you have a vector or hash (also cryptic terms), you need to know that because each of the three main types, scalars, vectors, and hashes, must be prefixed on *every* reference. This is even worse than static typing in a language like C. Unnecessary variable prefixes combined with extremely weak typing make Perl a terrible language for new users.
In Python, lists, tuples and dictionaries (terms from English) are much easier to use. Instead of requiring a prefix on every reference, the object is just created and then you can reference it without a prefix. And references are not necesary due to Python's linking model. Here are some examples of using Python's data types versus Perl's.
dictionary = {'Hi': 1,
'Hello': 2}
hi_value = python_dictionary['Hi']
reference = dictionary
hello_value = reference['Hello']
%dictionary = {"Hi", 1,
"Hello", 2};
$hi_value = $dictionary{"Hi"};
($reference) = %dictionary;
$hello_value = ${$reference}{"Hello"};
I'll let you choose which one is more legible and intuitive. In Python, you don't have to worry about whether things are scalars, hashes, references, or whatever, but if you think that's more readable, then that's fine.
Daniel Ehrenberg
I've seen some of those types of ads already. Almost all of them require IE or Flash. If you don't want to pay so much, switch to Mozilla Firebird and don't get Flash.
What are you talking about? For non-technical work, Linux is just as easy as Windows, as long as it is already installed (it causes problems for new users in both cases). I set my mom up on Linux (with GNOME) two months ago and it's no more difficult than before. All she knows is to click on the fire icon (mozilla firebird) on the top bar (it's set up to be somewhat like a classic mac) and then type 'yahoo mail' into the text bar that will pop up (address bar). This is actually slightly easier than typing mail.yahoo.com like before. Either way, she knows nothing about computers (except that she's using Linux), but it's not more difficult than before. Daniel Ehrenberg