Computer Science Canada What makes language X special? |
Author: | wtd [ Tue Nov 15, 2005 6:57 pm ] |
Post subject: | What makes language X special? |
This is an open question for anyone to answer. Think about it for a little while. What makes one of the programming languages you know and use special? What sets it apart? If not a language, what makes a particular environment in which you program special? |
Author: | Cervantes [ Tue Nov 15, 2005 8:49 pm ] |
Post subject: | |
WRT Ruby, efficiency. I want to do as little work as I can in accomplishing a certain task. Note that this is not the same as having a massive library that does almost everything for me. There's nothing (much) wrong with that, but it means I have to learn that massive library, which isn't a very efficient use of my time. Rather, I want to use blocks to customize such methods as "inject" to suit my needs. Making a method to do every possible variation of the "inject block" is highly inefficient, and quite likely impossible. On the other hand, forcing the programmer to take many steps to tailor that "inject" method is also inefficient. I like blocks. ![]() |
Author: | wtd [ Tue Nov 15, 2005 8:55 pm ] |
Post subject: | |
So you'd say it's a matter of compromising between a powerful language that tries to do everything with specialized additions to the language itself, and a language that tries to do very little with its core language, instead leaving everything to the library? |
Author: | Flikerator [ Tue Nov 15, 2005 9:18 pm ] |
Post subject: | |
Id say turing is the best language because its so simple, and there is so little you need to acomplish a specif goal. You can do a lot more in it then people give it credit for, catalyst is a perfect example of that = ) It does have it limits, and its not that good at very complicated programs that take a lot of calculations. But for simple programs id say its the best. I know wtd's gonna burn me on something... ![]() ![]() |
Author: | wtd [ Tue Nov 15, 2005 9:29 pm ] |
Post subject: | |
I would simply ask... what else do you have experience with? Also, be specific. How does Turing save you time? How does it do something better than other languages? |
Author: | Tony [ Tue Nov 15, 2005 10:39 pm ] |
Post subject: | Re: What makes language X special? |
wtd wrote: If not a language, what makes a particular environment in which you program special?
SciTE is my text editor of choice. One feature to point out is its ability to highlight the syntax of many different languages. As a web developer, I would be working with XML, XHTML, CSS, ruby templats (.rhtml), ruby source (.rb), javascript, and on an odd occasion some PHP. All at the same time. I'd have 10 files open, and each would have its syntax highlighted appropriatly. Pretty sweet. |
Author: | beard0 [ Wed Nov 16, 2005 1:33 pm ] |
Post subject: | |
While I wouldn't recommend it for most things, Assembly is nice in that you know exactly how many clock cycles each part will take. Also, you can come up with very creative run-time efficient solutions (as opposed to programming effecient). It's also a great learning experience to program in Assembly, as you gain a greater knowledge of computer hardware, and upon reflection, an understanding of some modern-language constructs. I did my programmings with various PIC chips, and even got the chance to do some "networking" where I had binary inputs of one chip connected to binary outputs of the other. It meant that I had to decide on my own protocol for the exchange of information. The programming that I did was very interesting in merging the software and hardware aspects, as I was actually drilling boards, and soldering, and design techniques whereby a pin could be used as input or output, by using resistors, as I was short on I/O pins for my application. I would definately encourage others to give it a try, and would be happy to help out if anyone has any difficulties. http://store.qkits.com/category.cfm/PIC |
Author: | wtd [ Wed Nov 16, 2005 1:38 pm ] |
Post subject: | |
This is fantastic. Keep the posts coming. ![]() |
Author: | Cervantes [ Wed Nov 16, 2005 5:45 pm ] |
Post subject: | |
wtd wrote: So you'd say it's a matter of compromising between a powerful language that tries to do everything with specialized additions to the language itself, and a language that tries to do very little with its core language, instead leaving everything to the library?
If that is supposed to say "leaving everything to the programmer", then yes. But I would also switch the placement of the word "powerful". I think it better suites the Ruby-esque language, rather than the library intensive language. Tony wrote: SciTE is my text editor of choice
I second that. |
Author: | Naveg [ Wed Nov 16, 2005 9:41 pm ] |
Post subject: | |
Cervantes wrote: Tony wrote: SciTE is my text editor of choice
I second that. AMEN! SciTE is amazing. As for the original nature of the thread, though I am by no means an expert using it yet, Python so far is a great language. It has a very simple, comprehensible syntax, and yet its power cannot be underestimated. It is also very programmer-efficient, one can write simple programs in very little code using python. I thank the python challenge (www.pythonchallenge.com) for getting me going with the language, and recommend it as an excellent beginning for those with prior programming experience who wish to learn python. |
Author: | rizzix [ Thu Nov 17, 2005 12:39 am ] |
Post subject: | |
SubEthaEdit here... (pfft! SciTE,, don't make me laugh) ![]() try doing this with SciTE: Block Editing |
Author: | rizzix [ Thu Nov 17, 2005 12:46 am ] |
Post subject: | |
Cervantes wrote: If that is supposed to say "leaving everything to the programmer", then yes. But I would also switch the placement of the word "powerful". I think it better suites the Ruby-esque language, rather than the library intensive language. You call it "powerful" i call it bloated.. Two sides of the same coin... unlike Ruby,, Haskell isin't bloated.. Haskell relies on it well defined library.. The language is small.. oh "very small"... and it is by far the only well-formed, well-defined language (from the ground up) i've seen to date... |
Author: | wtd [ Thu Nov 17, 2005 12:50 am ] |
Post subject: | |
rizzix: let's keep it positive here. |
Author: | Cervantes [ Thu Nov 17, 2005 3:44 pm ] |
Post subject: | |
rizzix wrote: You call it "powerful" i call it bloated.. Two sides of the same coin... unlike Ruby,, Haskell isin't bloated.. Haskell relies on it well defined library.. The language is small.. oh "very small"... and it is by far the only well-formed, well-defined language (from the ground up) i've seen to date...
I do not call languages bloated with library classes/functions powerful. I agree in calling them bloated. Ruby is not that bloated. When I wrote that sentance, I was comparing Ruby and Java. ![]() |
Author: | md [ Thu Nov 17, 2005 10:49 pm ] |
Post subject: | |
Pascal! Awesome syntax that's easy to follow and free of redundant braces of all kinds. Only thing wrong with it is that there is no official standard ![]() |
Author: | rizzix [ Fri Nov 18, 2005 9:12 am ] |
Post subject: | |
Cervantes wrote: rizzix wrote: You call it "powerful" i call it bloated.. Two sides of the same coin... unlike Ruby,, Haskell isin't bloated.. Haskell relies on it well defined library.. The language is small.. oh "very small"... and it is by far the only well-formed, well-defined language (from the ground up) i've seen to date...
I do not call languages bloated with library classes/functions powerful. I agree in calling them bloated. Ruby is not that bloated. When I wrote that sentance, I was comparing Ruby and Java. ![]() ehm... java's a pretty good example of a not-so-bloated language.. (i think u got it all mixed up).. java has a small base syntax (hence "not-so-bloated",, but yet, not as small as haskell though) and it handles almost everything through it's powerful library. btw: if u still didn't get it... IMO Haskell is the least bloated language.. geez |
Author: | Cervantes [ Fri Nov 18, 2005 4:58 pm ] |
Post subject: | |
rizzix wrote: ehm... java's a pretty good example of a not-so-bloated language.. (i think u got it all mixed up).. java has a small base syntax (hence "not-so-bloated",, but yet, not as small as haskell though) and it handles almost everything through it's powerful library. btw: if u still didn't get it... IMO Haskell is the least bloated language.. geez So I'm thinking of "bloated" differently than you. I'm referring to a bloated language as having an extremely large library (haven't I said this already?). Whereas you would call that powerful. I don't think Ruby is bloated in either sense of the term. |
Author: | zylum [ Fri Nov 18, 2005 11:46 pm ] |
Post subject: | |
ive only tried turing, java and c++. my least favuorite language is c++ but thats probably because im least familiar with it... i also think the syntax is ugly. when i want to do something simple quickly, i turn to turing because of its simplicity. im completely familiar with turing and can come up with code very fast. when i want to do something more complex i turn to java. im pretty familiar with it and it has good documentation when i need to learn something new. I also like the libraries. they make many things a lot easier for me. for example i am trying to compute the digits in pi. instead of making my own arbitrary precision class, i just used BigDecimal... also it has good support for regular expressions so its easier for me to do string related problems when im doing programming contests. |
Author: | wtd [ Sat Nov 19, 2005 12:25 am ] |
Post subject: | |
zylum wrote: also it has good support for regular expressions
You may wish to check out Ruby. It has fantastic support for regular expressions. ![]() |
Author: | zylum [ Sat Nov 19, 2005 1:54 am ] |
Post subject: | |
too bad ruby isnt supported in many programming contests ![]() |
Author: | Cervantes [ Sat Nov 19, 2005 8:18 am ] |
Post subject: | |
That shouldn't be such a major deterent that you don't learn it, especially since it does so many things well. |
Author: | rizzix [ Sat Nov 19, 2005 3:26 pm ] |
Post subject: | |
wtd wrote: zylum wrote: also it has good support for regular expressions
You may wish to check out Ruby. It has fantastic support for regular expressions. ![]() Does ruby support Possessive quantifiers? |
Author: | wtd [ Sat Nov 19, 2005 4:00 pm ] |
Post subject: | |
rizzix wrote: wtd wrote: zylum wrote: also it has good support for regular expressions
You may wish to check out Ruby. It has fantastic support for regular expressions. ![]() Does ruby support Possessive quantifiers? I actually can't find a definitive answer. Perhaps you could give me an example of their use and I could translate into Ruby and seeif I get the same result. ![]() |
Author: | wtd [ Sat Nov 19, 2005 4:08 pm ] | ||
Post subject: | |||
Apparently not.
Oh well, I still give Ruby (and Perl) credit for making regexes so esy to use that more people are likely to investigate them. |
Author: | rizzix [ Sat Nov 19, 2005 4:37 pm ] | ||
Post subject: | |||
you mean this is not simple?
The way i look at it: at least java does not define a new syntax for every newly added feature.. (thus keeping the language less bloated) |
Author: | wtd [ Sat Nov 19, 2005 5:26 pm ] | ||||||||||
Post subject: | |||||||||||
Or:
Or:
Or:
There's no new syntax defined. It relies on the ability of Ruby to handle operator overloading. The =~ operator is available to all objects. The slashes are simply another quoting mechanism which creates a regular expression, rather than simply a string. Since regular expressions are treated distinctly from strings, we can have things like:
|
Author: | rizzix [ Sat Nov 19, 2005 5:41 pm ] |
Post subject: | |
![]() ![]() |
Author: | wtd [ Sat Nov 19, 2005 5:51 pm ] |
Post subject: | |
Ok, what are you on? Do you think there's a special piece of code in the interpreter for each of those expressions? |
Author: | Cervantes [ Sat Nov 19, 2005 6:53 pm ] | ||||||
Post subject: | |||||||
rizzix wrote: you mean this is not simple?
The way i look at it: at least java does not define a new syntax for every newly added feature.. (thus keeping the language less bloated) rizzix wrote: ![]() It is not new syntax, and it is not bloated. These are methods, much like == is a method.
can also be rewritten as
The reason I say Java is bloated is because of its enormous library. It needs this enormous library in order for its programmers to write as concise code as Ruby programmers can, without such a library. |
Author: | wtd [ Sun Nov 20, 2005 12:53 am ] |
Post subject: | |
Cervantes wrote: The reason I say Java is bloated is because of its enormous library. It needs this enormous library in order for its programmers to write as concise code as Ruby programmers can, without such a library.
One of the biggest issues, as I see it, is the lack of syntactic support for simple yet flexible aggregate data structures. Dealing with aggregate data is crucial to just about every non-trivial program imaginable. Making that easy to do is an advantage which scales quite nicely. |
Author: | rizzix [ Sun Nov 20, 2005 2:50 pm ] |
Post subject: | |
Obviously Cervantes, you don't seem to understand the fact that TIMTOWTDI is a bad practice in the real world.. (it's one of the reasons Perl will always be just a "scripting" language). If ruby get's the same attention that C++ has.. then you'll begin to see the real problems with this all-so-fascinating feature called operator overloading. A large library is not really all that bloat. A good, well structured, documentation (which undoubtedly java does have) makes up for the possible drawbacks of having a large library. And No! Operator overloading is not the same as functional overloading (which is in fact also discouraged (as far as possible) in the Java-world). Operator overloading means to define a new syntax. It's true that Ruby does try to blur out the line between the definition of a function versus that of an operator. But it can't erase the fact that a new syntax is formed! Unnecessary syntax-sugar "usually" always leads to bad programming practices. |
Author: | wtd [ Sun Nov 20, 2005 3:25 pm ] |
Post subject: | |
I take it operator overloading and function overloading are evil in Haskell as well. ![]() |
Author: | rizzix [ Sun Nov 20, 2005 4:27 pm ] | ||
Post subject: | |||
u can't do this in haskell:
![]() (overriding is allowed.. overloading isin't) and.. fortunately enough you can't override the [] operator *phew*. Besides the way Haskell implements it is way different. It strictly adheres to category theory. Which brings about a sense of structural rigidness in the code. As i said "everything is well-defined" and nothing can fall outside those boundaries. |
Author: | MihaiG [ Sun Nov 20, 2005 5:23 pm ] |
Post subject: | |
im learning Lua...its open source.....but no IDE...so you have to use a text editor like scintilla text editor...*thre are some IDE but there bad ![]() it can work with excel,word resize colums,rows...which is neat... ![]() ![]() |
Author: | wtd [ Sun Nov 20, 2005 5:28 pm ] |
Post subject: | |
El Comandante wrote: im learning Lua...its open source.....but no IDE...so you have to use a text editor like scintilla text editor...*thre are some IDE but there bad
![]() it can work with excel,word resize colums,rows...which is neat... ![]() ![]() Not a criticism of Lua, but much the same is possible in other interpretered languages like Perl, Python, and Ruby. Just a "you have lots of options for this kind of work" comment. ![]() |
Author: | wtd [ Sun Nov 20, 2005 5:37 pm ] |
Post subject: | |
I suppose it's about time for me to answer. I like teaching students how to program. So, what makes Objective-Caml special? The single most compelling thing for me is how the language and the library work together. The language makes some very powerful code possible and richly rewards programmers for using advanced techniques, but getting started doesn't require use of these advanced features, so there's a much smoother learning curve. Even the other languages I'm fond of don't do this nearly so well. |