Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Favorite programming language?  (Read 38573 times)

0 Members and 1 Guest are viewing this topic.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Favorite programming language?
« Reply #15 on: November 22, 2011, 06:58:59 AM »
I was trying to dereference Null Pointers before it was cool.

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: Favorite programming language?
« Reply #16 on: November 22, 2011, 07:07:41 AM »
Prolog.  I have fond memories of Prolog.  Likewise Turtle Basic (although I think that one might not be Turing complete...)

Today most of my work is in PHP/javascript, but both languages have too many flaws for me to claim them as my favourite.
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Favorite programming language?
« Reply #17 on: November 22, 2011, 11:23:04 AM »
Never knew it. Never will.  ::)
http://en.wikipedia.org/wiki/Prolog
Quote
Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of relations, represented as facts and rules. A computation is initiated by running a query over these relations.[4]

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Favorite programming language?
« Reply #18 on: November 22, 2011, 11:52:47 AM »
Never knew it. Never will.  ::)


why?

Imperative Programming languages aren't the best tool for everything. Most people just think they are.

Declarative Programming Languages have plenty of applications and there are plenty of situations where they are ideal. SQL, for example. The focus is not on how the program does what it does, but more on what it does. This means that for the most part you are usually limited in some way as to what you can tell it to do. On the other hand, you can still get it to do just about anything. People have written SQL queries that generate ASCII mandelbrots, for example.

Functional Programming, like F#, Lisp, scheme, and if you want to, even segments of C# can be written in a "functional" way. For the most part, it's similar to Declarative programming- in fact, Functional Programming is in many ways a subset of Declarative programming, but with a focus on solving problems through recursion. The only way for somebody used to an imperative style to understand the Functional style is through contrast.

Say you have a list in C. And you want to pull out every Xth element. You'll have to point at the first element. set a counter to 0. Then, you add X to that counter until X is greater than the size of that list, and with every item, add it to a new list.

The equivalent in a functional language would be to write a function (surprised?) that recognizes when the size of a list is a multiple of X, and then pass that function to the list, possibly with another snippet of code (a lambda, for example) to hand back the head of your list if your X-recognizer evaluates to true, and discard it if it evaluates to false. The two functions recurse through the list and finally hand back a list consisting of every Xth element.

For example, let's say you have a List<String> (List of Strings) in C#. Since C# supports both programming models, the contrast can be most apparent. the "Traditional" method might work like this:

Code: [Select]
public List<String> EveryX(List<String> OfList,int X)
{
List<String> returnlist = new List<String>();
int i=0;
for(i=0;i<OfList.Count();i+=X)
{
    returnlist.Add(OfList[i]);
}
return returnlist;
}

(note, might not be 100% accurate, but the jist is about right). Now, compare that to the functional way to do the same thing:

Code: [Select]
List<String> everyN =  list.Where((x, i) => i % (n-1) == 0);

The latter method is shorter, but might seem more confusing. And in a way, it is. Functional Programming can be a mind bender, which is one reason why Lisp, Scheme, Haskell, Prolog, and other declarative/functional languages have never really surpassed C, C++, Java, COBOL, or other imperative languages in commercial popularity. But there are benefits to the functional way of doing things. For one thing, if you can get the logic correct, functional programming requires orders of magnitude less code than the imperative approach. That means fewer points of failure, less code that needs tested, and in general a more productive (and happier) programming experience. As systems get bigger, this is starting to become more and more important.

The industry is young, and yet so many people seem to think that we're at the "mountaintop" when it comes to the tools we use and the hardware we use and so forth. C/C++, and other imperative languages are not the be-all end all of programming languages, and so-called programmers who discount other programming styles as "novel" simply because they do not understand their paradigms is possibly one of the things holding back Software development as an industry and keeping it in some weird Limbo between arcane wizardry, gambling, and art.
I was trying to dereference Null Pointers before it was cool.

Salmon Trout

  • Guest
Re: Favorite programming language?
« Reply #19 on: November 22, 2011, 12:21:28 PM »
Isn't asking a programmer what is their favourite programming language a bit like asking a builder what is his favourite brick?


Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Favorite programming language?
« Reply #20 on: November 22, 2011, 12:50:56 PM »
Isn't asking a programmer what is their favourite programming language a bit like asking a builder what is his favourite brick?
Yes, and sometimes we get a good rant from BC_programmer.

I like red bricks. But I am not a bricklayer. So it doesn't count. Which brings us to "Ruby on Rails". I presume it is red.

Salmon Trout

  • Guest
Re: Favorite programming language?
« Reply #21 on: November 22, 2011, 01:06:21 PM »
I guess I meant that a proper practical builder will say "Well, for cladding an external wall I'd use red facing bricks, and for load bearing I'd use building bricks, and where strength and low water absorption are key requirements, I'd probably choose engineering bricks." So you say, "Yes, but what's your favourite?" And he says, "I don't really have one; I use the right one for the job. If I only knew how to use one brick, or insisted on only using one type out of aesthetic reasons, I wouldn't be a builder, I'd be a hobbyist, a guy who plays around with building materials."


Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Favorite programming language?
« Reply #22 on: November 22, 2011, 01:33:55 PM »
Got it!
OK, after that I am ready. Here it comes...
Now that I am retired, I am at last a real Hobbyist. So I now can admit my favorite programming tool is:
Aston Tate DEBASE II om CP/M.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Favorite programming language?
« Reply #23 on: November 22, 2011, 01:47:52 PM »
Got it!

Quote
So I now can admit my favorite programming tool is:
Aston Tate DEBASE II om CP/M.

The second quote clearly refutes the former.

Quote
Isn't asking a programmer what is their favourite programming language a bit like asking a builder what is his favourite brick?
yes. precisely.

What you get from "What is your favourite programming language" is a bunch of people talking about different programming languages which in a lot of cases are built for a lot of different tasks. Another analogy would be to ask somebody what their favourite workshop tool is. Obviously, you use a hammer for hitting nails, a screwdriver for driving screws, a plane for smoothing wood, rivetdrivers for metalworking, etc. You can't have a favourite tool. Now, you can have a favourite task that uses that tool. For example, if somebody finds hammering nails to be their favourite task, than they might claim that a hammer is their favourite tool. But what they are really saying is that they prefer the experience of hammering nails. The fact that it uses a specific tool isn't necessarily relevant. At the same time, there will be people saying "Well I have always preferred the experience of using a Screwdriver". Then the Hammer person will refute that the Screwdriver is good at Screwing in screws, but it fails miserably at removing nails from plasterboard. And then you just get back and forth about what each tool is best at and what they are better at.

"Language Wars" as far as Computer programming are at worst slagfests that bring nothing of useful value to anybody and at best moronic. programming Languages can't be compared, since they can't really be measured. They were all designed for different purposes, and for those purposes, they are usually very well suited. As an example- take Scheme. It was designed to be used to teach programming concepts. That's pretty much all it is used for, however- you don't see commercial applications written in scheme. Because it doesn't work very well outside the classroom. However, it works very well to teach the principles of Computer Programming, and the fact is that teaching using a language like scheme is useful for the very reason that it's not used outside that context. Students are able to take-away from their lessons the concepts, not the syntax. Far too often do I see people focussing on the particulars of the syntax of the language being taught. But the fact is, usually those courses are for teaching programming. The fact that they are teaching it using Java, or C, or whatever is a irrelevant detail. What is important is the concepts.
I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Favorite programming language?
« Reply #24 on: November 22, 2011, 02:03:15 PM »
Quote
Students are able to take-away from their lessons the concepts, not the syntax. Far too often do I see people focussing on the particulars of the syntax of the language being taught.
Yea.  :)

Salmon Trout

  • Guest
Re: Favorite programming language?
« Reply #25 on: November 22, 2011, 02:24:24 PM »
"Language Wars" as far as Computer programming are at worst slagfests that bring nothing of useful value to anybody

This is a mode of behaviour common among adolescent males: what is the best car/plane/gun/phone/motorcycle/computer game/CPU/gaming motherboard/display card/whatever. Toys for boys. One-upmanship. Ego. To even have a "favourite" language is to have royally missed the point of what programming is about.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Favorite programming language?
« Reply #26 on: November 22, 2011, 03:13:52 PM »
This is a mode of behaviour common among adolescent males: what is the best car/plane/gun/phone/motorcycle/computer game/CPU/gaming motherboard/display card/whatever. Toys for boys. One-upmanship. Ego. To even have a "favourite" language is to have royally missed the point of what programming is about.

I think the main reason for those types of things is that, by default, people like to think they are intelligent. That sort of goes without saying. The implication that the language they prefer to use is somehow not ideal at everything, seems to them to "attack" the notion that they made an intelligent choice with that language, and learning it. You can usually tell the difference between somebody just bleating that the language is best and somebody who learned it as well as other languages. The former will be very argumentative when their "favourite" language is criticized in any way. And admittedly, when VB6 was pretty much the only language I was particularly proficient in, I was the same way with it. Now that I've learned several, I know that I was quite wrong in those defenses. At the same time, though, people who attack a Programming language are really just trying to bolster their own choice not to use that language, which is oftentimes the same situation. Then you have the people who seem to think that braces and semicolons are the only way to code.

Myself, I might be inclined to say my "favourite" language is C#. However I also understand that that favouritism is merely a result of my familiarity with the language, and the fact that I am unfamiliar, or at least less proficient, with any number of other languages that might suit a given task better. And thus my preference is purely subjective and is not indicative that it is the best choice- but rather that it is my choice.

What is annoying is to see threads, here and elsewhere, that essentially ask "What programming language should I learn" which are from somebody who wants to learn to program. I find this annoying because the question is sort of idiotic (to be blunt). Rather than wasting time asking what you should be learning, you should just choose something and learn it. It doesn't really matter what language you start with, as long as you don't stay with that one language and try to shoehorn it into niches it doesn't belong (like trying to write a CGI script in C++). It is the concepts behind the language that are important, not whether it's "easier" to learn a language because it does or does not use certain punctuation or because it "encourages good whitespace use". Many times I've suggested that they not learn one language, but several. And most importantly, avoid language elitism. And forget any arguments that "Language X is easier to use" because when you don't know how to program no programming language is going to be "easy to use", so it doesn't much matter what a person learns.

I mean, I've seen flamewars about the ideal lower bounds of an array! How can somebody even hold an opinion over whether an array should start at 0 or whether it should start at 1?
I was trying to dereference Null Pointers before it was cool.

Salmon Trout

  • Guest
Re: Favorite programming language?
« Reply #27 on: November 22, 2011, 03:49:47 PM »
How can somebody even hold an opinion over whether an array should start at 0 or whether it should start at 1?

Human vanity and folly know no boundaries. Some people will take up and defend a position about anything. It's interesting to note that the two alternative conventions about ordering of individually addressable sub-components within the representation of a larger data item, Big-endian and Little-endian are thus named because of the controversy in the fictional world in Swift's satire, Gulliver's Travels. The eponymous hero discovers two countries, Lilliput and Blefuscu, which have gone to war over which end an egg should be broken, the big end or the little.

"Which two mighty powers have, as I was going to tell you, been engaged in a most obstinate war for six-and-thirty moons past. (...) the primitive way of breaking eggs, before we eat them, was upon the larger end; (...) the emperor his father published an edict, commanding all his subjects, upon great penalties, to break the smaller end of their eggs. (...) Many hundred large volumes have been published upon this controversy: but the books of the Big-endians have been long forbidden (...)"

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Favorite programming language?
« Reply #28 on: November 22, 2011, 04:49:59 PM »
Big end.Little end. Let's compromise. Make the middle the default. That will please nobody equally.

In Pascal, you specify what boundaries you want for an array.
Examples of this would be having a list of different types or records.

Code: [Select]
type my_list_of_names = array[0..7] of string;
 var the_list: my_list_of_names;
 begin
  the_list[5] := 'John';
  the_list[0] := 'Newbie';
end;


Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: Favorite programming language?
« Reply #29 on: December 05, 2011, 09:20:59 AM »
To even have a "favourite" language is to have royally missed the point of what programming is about.

Oh I disagree.  I nominated Prolog for its elegance and because it was the sandpit in which I learnt the overwhelming might of deep recursion.

I also have a favourite tool; a Makita combi drill.  But I certainly haven't missed the point of what DIY is about.
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos