12 Replies - 6474 Views - Last Post: 26 June 2011 - 04:33 PM

#1 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 926
  • View blog
  • Posts: 3,204
  • Joined: 19-January 10

Languages have their purposes

Posted 24 June 2011 - 11:09 PM

So like, each language has their own strengths and weaknesses right?

Php is great for web developement, f# is (from what I've heard) good for math stuff; etc.

What's your language and what's the best use of it?
Is This A Good Question/Topic? 0
  • +

Replies To: Languages have their purposes

#2 skybomb0  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 92
  • Joined: 12-May 10

Re: Languages have their purposes

Posted 25 June 2011 - 12:00 AM

My language is C# and it can do anything that doesn't require uber speed. But it is commonly used for quick development of desktop applications.
Was This Post Helpful? 0
  • +
  • -

#3 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Languages have their purposes

Posted 25 June 2011 - 01:06 AM

Yes, typically, but not to the extent that languages are automagically balanced like character classes in a video game.

My favorite language is (obviously) Clojure. It's pretty difficult to choose a 'best' use for it, but if I had to, it would probably be concurrent applications. Clojure is designed from the ground up to make concurrency easy and boasts an STM (software transactional memory) system.

This post has been edited by Raynes: 25 June 2011 - 11:32 AM

Was This Post Helpful? 0
  • +
  • -

#4 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5780
  • View blog
  • Posts: 12,596
  • Joined: 16-October 07

Re: Languages have their purposes

Posted 25 June 2011 - 05:24 AM

The vast majority of languages are designed as general purpose languages. Even PHP is a general purpose language, with a focus on spitting out HTML for a web sever.

There are some places you have to go "bare metal" and run on the machine, here C++ and C are the most popular choices. For everything else, it's an interpretor / virtual machine. Within the VM sandbox, depending on how sandboxed they are, most general purpose languages hold there own.

I'm a professional developer in Windows, so in that domain it's C# all the way. In Windows, you don't really get to play with the hardware; everything is abstracted through the OS. So, for most practical purposes, the CLR of .NET is not much of an impediment.

For all else, I prefer Python. A clean, multi-paradigm language, that let's you go as shallow or deep as you like with your prefered solution. You can write a simple sequential program or an OO beast. You can be draconian about typing if you have to, but you really don't have to. While interpreted, it semi compiles and usually hooks into C for the heaving lifting.

I just read an interesting article about Basic, with Python as the star, chosen over Java: Basic is (mostly) dead. Long live Python as the next starter language?

Though I admit to enjoying the simplicity of C at times and will go C++ for amusement.
Was This Post Helpful? 1
  • +
  • -

#5 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7578
  • View blog
  • Posts: 12,742
  • Joined: 19-March 11

Re: Languages have their purposes

Posted 25 June 2011 - 02:58 PM

Baagvai - reading that article, I had the urge to whip up a BASIC interpreter and send it to Mr. Brin. Do I sense a coding challenge here? Might be fun... interpret some flavor of BASIC in your favorite language.

I do have some problems with Python as a starting language - I'd prefer C, or Java in a pinch. Basically, I want the student to have to work a bit at understanding the fundamentals, and Python doesn't really give you that. I know, Spolsky already wrote that article, but I think he's got a lot of good points there, and they apply as much to the shift from Java to Python as they do for the shift from C to Java - in both cases you're coddling the students' self esteem instead of demanding that they actually work at understanding what's going on.
If you go through Sedgewick's Algorithms text in C, you can be pretty sure you understand what's going on down to the bare metal. If you do the same in Python, I'm not sure you get the same benefit.

This post has been edited by jon.kiparsky: 25 June 2011 - 03:04 PM

Was This Post Helpful? 0
  • +
  • -

#6 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Languages have their purposes

Posted 25 June 2011 - 05:26 PM

Quote

Do I sense a coding challenge here?

maybe, i will have to see how big Basic. there may be a very simple dialect that would be fit for use in a challenge here on DIC.

i use C++ and Lua for almost everything. in fact i like using Lua so much that often times i will simply expose a C++ library to Lua(just the parts that i need typically) and write the whole application in Lua. as for the benefits of C++...well it's nutso fast and i have been using it for 2 years now so im pretty adept at using. as for Lua it would have to be the single most extensible/embeddable language there is Lua is also fast, garbage collected, and dynamically typed which makes it very simple to use.

This post has been edited by ishkabible: 25 June 2011 - 05:27 PM

Was This Post Helpful? 0
  • +
  • -

#7 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5780
  • View blog
  • Posts: 12,596
  • Joined: 16-October 07

Re: Languages have their purposes

Posted 25 June 2011 - 06:43 PM

View Postjon.kiparsky, on 25 June 2011 - 05:58 PM, said:

Baagvai - reading that article, I had the urge to whip up a BASIC interpreter and send it to Mr. Brin.


Heh, I know what you mean. I fired up some GW-BASIC (gotta love DosBox) for one of DIC's coding challenges a while back. The nostalgia was so heavy it was painful. However, I was struck that an old line BASIC programmer would have a pretty good handle on assembly flow. Also, how short the list of commands is. I did think about implementing an interpretor at that time. :P

View Postjon.kiparsky, on 25 June 2011 - 05:58 PM, said:

I do have some problems with Python as a starting language


I really can't say for sure what I think the best starting language is. Modern languages have tons of built in goodies. You can look at that and say it's good, because the student can concentrate on fundamental concepts, or it's bad because everything already has a class or library waiting to go.

I've recommended Java as a first language, based on it's draconian OO model and strong typing, which I feel are core concepts. But I'm not sure. From that place, I can see how python my be more appealing.

I also see the plain old C side. It teaches all the basics of a procedural language, the idea of data types ( if not strictly enforced ), and a more fundamental understanding of how computers actually think. While it's gotchas are straight forward, they also tend to just blow up rather that giving a good reason, which may be a problem.

Honestly, there's nothing quite like old line BASIC. There are so many languages, but nothing quite there.
Was This Post Helpful? 1
  • +
  • -

#8 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Languages have their purposes

Posted 25 June 2011 - 07:38 PM

i think it's best to know a wider array of languages honestly. the whole reason im learning functional programing is to be a better programer. i feel that understanding multiple paradigms is the best way.

here is a list that i think is pretty well rounded
C/C++ -- lower level procedural programing, this acts as a kinds of bridge between Java and assembly

Java -- teaches pure OO, strong typing, and very structured programing

assembly -- doesn't matter what architecture. just so long as you have the ultra low level

Lua -- any scripting language will do, i just like Lua

Haskell -- purely functional, this forces you to think functioanly and solve problems diffrently

Lisp -- again, this is employs different techniques even from Haskell. i think this is a nice addtion to the list

these are all very cross platform languages as well, C# would probably teach the same things as Java. F# could teach what lisp and Haskell teach. i just prefer cross-platform languages generally speaking.

This post has been edited by ishkabible: 25 June 2011 - 07:45 PM

Was This Post Helpful? 0
  • +
  • -

#9 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5780
  • View blog
  • Posts: 12,596
  • Joined: 16-October 07

Re: Languages have their purposes

Posted 25 June 2011 - 07:53 PM

View Postishkabible, on 25 June 2011 - 10:38 PM, said:

i think it's best to know a wider array of languages honestly.


Not saying it isn't. The question on the table, however, was which to begin with.

For the record, my first programming language was good old fashioned BASIC. First on a VIC 20, but it wasn't mine. Apple ][ ( yeah, they spelled it like that ), and ultimately the first computer of my very own; an Atari 800.

Lua is interesting. I feels it's quite similar to Javascript, actually. Python or Ruby will scratch the same itch. I go with Python here because it's has to most tools to recommend it. If I needed an embedded language, Lua of course wins.
Was This Post Helpful? 0
  • +
  • -

#10 jimblumberg  Icon User is offline

  • member icon


Reputation: 3993
  • View blog
  • Posts: 12,323
  • Joined: 25-December 09

Re: Languages have their purposes

Posted 26 June 2011 - 06:57 AM

Quote

For the record, my first programming language was good old fashioned BASIC. First on a VIC 20, but it wasn't mine.


Ah the good old days!

This was actually my second language, the VIC was the first computer I purchased, no hard drive (had a cassette tape) and the small amount of memory really made for "creative" coding to get most anything of any use to run.

For my first language I started with dBase II using a Kaypro running on the CP/M operating system, no hard disks, just 2 5-1/2 floppies.

Jim

This post has been edited by jimblumberg: 26 June 2011 - 06:58 AM

Was This Post Helpful? 0
  • +
  • -

#11 SurfingShark  Icon User is offline

  • D.I.C Head

Reputation: 38
  • View blog
  • Posts: 188
  • Joined: 18-April 11

Re: Languages have their purposes

Posted 26 June 2011 - 09:25 AM

I'm a .NET guy, so C# for my language preference 99% of the time. I also concentrate on the web application side of .NET, so Javascript I use a bit as well.

My roots are C/Assembly. Nothing like full control!...when you have the time.
Was This Post Helpful? 0
  • +
  • -

#12 demosthenes2k8  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 93
  • Joined: 30-December 09

Re: Languages have their purposes

Posted 26 June 2011 - 12:03 PM

I generally use C++, unless I just want to make a quick script, in which case I use either my own language, or Python. I'm trying to learn D, though, because it seems like it'll make a lot of the problems I have with C++ vanish.
Was This Post Helpful? 0
  • +
  • -

#13 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Languages have their purposes

Posted 26 June 2011 - 04:33 PM

i tried D, i liked it quite a bit but i find that it kinda failed at one of it's major design goals...making a clearer language than C++.

it's a language of a rather large complexity. it may be smaller than C++ but it's still a rather obtuse language. Java is not so obtuse if you ask me. also D isn't that much faster either, i was kinda disappointed to find that out :(

if you ask me how D could have been better then i give you this
*take C as a base, eliminate ambiguous definitions like int* x;, take a Go route here
*make arrays like Java arrays, such that all are dynamically allocated and garbage collected
*make pointers only allow pointing to single objects and make them garbage collected
*take away some of the unnecessary syntax of C
*add simple OO mechanisms

you have your self a clean, future proof, language that should be simple, fast, and garbage collected

as an added bonus you may want to add the advanced array features of D, concatenation, slicing, ect...

This post has been edited by ishkabible: 26 June 2011 - 04:36 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1