Languages for different purposes (was Re: New user's initial thoughts/ criticisms of Python)

C

Chris Angelico

Well, there aren't that many groupings towards which languages
specialize for (not including embedded or other application-specific
domains). There's OS scripting, Web scripting, and then the otherwise
general-purpose "normative" languages in the middle of those two
extremes. But this view presumes a model of computation which hasn't
settled into wide agreement.

So, on what basis _would_ you choose a language for some purpose?
Without speaking specifically of web development here, how do you
choose a language?

* Some languages are just fundamentally bad. I do not recommend ever
writing production code in Whitespace, Ook, or Piet.

* Some languages force you to do a lot of bookkeeping, memory
management, etc. These are inferior unless their corresponding
advantages (usually performance or memory use) justify it.

* Some situations specifically demand one language. If you're writing
code to be deployed on cheap web servers, it's probably going to have
to be in PHP. If it's to run inside a web browser, it pretty much has
to be JavaScript, ActionScript, or maybe something that compiles to
one of those.

But that would still leave you with a good few choices. When it comes
down to it, how do you choose between Ruby, Python, Perl, Pike,
JavaScript, <insert language of choice here>, etcetera? I can think of
a few considerations that may or may not be important... and I'm sure
you can add more.

- Library support. For web work, it might be useful to be able to
create a PNG image on the fly (live graphs and such), or to have a
simple one-liner that handles cookies and persistence.

- Familiarity with the language. Why learn another one when you
already know this one?

- *Un*familiarity with the language. If you're going to have to learn,
may as well charge your boss for it!

- Proper Unicode support. For manipulating text, helps to be able to
work with it as text.

- Lack of proper Unicode support. Maybe it's easier to just work with
bytes everywhere? :)

- Ease/atomicity of deployment of new versions (maybe even while it's running)

- Buzzwordiness? If your boss asks you to choose a language and you
can say either "Ruby on Rails" or "CherryPy", are you more likely to
get approval for the former?

Something to throw open there. Citations from actual choices made a bonus. :)

ChrisA
 
W

wxjmfauth

* Some languages are just fundamentally bad.

The flexible string representation is a perfect exemple.

Again, a short explanation:

This FSR splits unicode in chunks. Two immediate consequences:
- It's necessary to keep track of "each individual internal pieces of text".
- It's necessary to waste time in switching between the internal coding
schemes.

Bad memory and bad performance at the same time.


In fact, with such a mechanism, it is even impossible to write an editor.

jmf



I do not recommend ever
 
C

Chris Angelico

The flexible string representation is a perfect exemple.

Wow. A new low for you, jmf... comparing PEP 393 to Ook?!?
In fact, with such a mechanism, it is even impossible to write an editor.

And somehow a performance tradeoff makes Python no longer Turing complete.

ChrisA
 
M

Mark Lawrence

The flexible string representation is a perfect exemple.

Again, a short explanation:

This FSR splits unicode in chunks. Two immediate consequences:
- It's necessary to keep track of "each individual internal pieces of text".
- It's necessary to waste time in switching between the internal coding
schemes.

Bad memory and bad performance at the same time.


In fact, with such a mechanism, it is even impossible to write an editor.

jmf

For the benefit of newbies, lurkers or whatever please ignore the
rubbish written by "Joseph McCarthy" Faust regarding PEP 393 and the
Flexible String Representation. He keeps making these false claims in
double spaced google crap despite having been shot down in this thread
https://groups.google.com/forum/#!topic/comp.lang.python/JkVQT0Wbq1A[1-25-false],
where he was asked to provide evidence to support his claims. he didn't
do so then, he's been asked repeatedly since to do so but hasn't because
he can't, hence his newly aquired nickname.
 
E

Ethan Furman

The flexible string representation is a perfect exemple.

Argh! He escaped! *chase* *scuffle* *stuff* *stuff* *stuff*

Whew. Safely back in the troll bin.

Okay, back to my day.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top