Spungo
Diamond Member
- Jul 22, 2012
- 3,217
- 2
- 81
Code is data and corporation are people100% incorrect. Code is logic. All logic in SIRI, Google, etc. has already been created by other people. SIRI and Google attempt to parse data and apply it to pre-written code as variables. A programmer should know the difference between data and code.
Coding in English seems like a simple idea, but it's bound to get complicated when it tries to include more things. Perl started as one guy's attempt to simplify things, and it evolved into something huge. The guy who made Perl is a linguist, so he tried to make it more like spoken English, and that included things like context. A variable in Perl can be a string and a number at the same time depending on how it's called. That small feature changes some of the syntax. Since strings can be numbers, writing "variable1 + variable2" doesn't work anymore because it's ambiguous. Are you adding them as strings or adding them as numbers? The solution is to use a period to join strings, "variable1 . variable2" creates "variable1variable2". This creates another new problem. Other languages use periods to separate classes and methods, so how can Perl have those features? Let's use an arrow instead, class->method. That probably screws up some other thing done by other languages, so it gets even more complicated. Another thing is that languages like C# use => for lambda expressions. You can't do that in Perl because => is the same as a comma; one can be swapped for the other and the code will work. At some point, someone said it would make Perl easier to read if certain things had arrows, such as hash tables:
Code:
%hash = (
key1 => value1,
key2 => value2,
);
Well then what happens if other languages start adopting that kind of syntax for some other feature? Then it gets even more crazy.
My point is that every language starts simple and becomes more complicated. The only way to keep English as simple as possible is to not include new features, and that's ok. There's nothing wrong with having languages that can only do a small number of things. Sometimes limited functionality is a good thing if it makes things easier to use. A calculator is a good example. A $5 calculator is easy to use. A $100 calculator can do all kinds of crazy things including graphing and calculus. Which one should a professional engineer have? The $100 calculator because it does more things. Which one should be given to someone who just wants to add some numbers on a bar tab? The $5 calculator because it's easier to use for that particular task.
As others have stated, English is a very wordy language. If English is to be used for programming, it needs to be kept as simple as possible. No classes, no inheritance. Put emphasis on encapsulation and breaking things down into small pieces.
Last edited: