Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Before the computer age  (Read 246 times)

0 Members and 1 Guest are viewing this topic.

Offline Dan

  • N Forum Veteran
  • Broke the fourth wall
  • *****
  • Posts: 5662
  • Country: ca
  • Location: Longueuil
  • Gender: Male
  • Age: 34
  • Referrals: 1
Re: Before the computer age
« Reply #15 on: October 11, 2009, 06:40:37 pm »
But can you do it with something that is obviously a scripting language?

Which language would obviously be a scripting language?

Just out of interest, you mentioned an interpreter being used behind the scenes for C and C++. Do you have any concrete examples?[/quote]

CERN made CINT which is an interpreter for C and C++.
"Politics is an ocean of toes" - Jacques Parizeau (1930-2015, RIP)

Karla

  • Guest
Re: Before the computer age
« Reply #16 on: October 11, 2009, 06:57:07 pm »
But can you do it with something that is obviously a scripting language?

Which language would obviously be a scripting language?


Javascript.

Just out of interest, you mentioned an interpreter being used behind the scenes for C and C++. Do you have any concrete examples?

CERN made CINT which is an interpreter for C and C++.

It's a definite choice to use that. The whole ethos of C and C++ is that you only get what you pay for. So for example, if I want a garbage collector, I have to either develop it or use an existing one. An interpreter is not part of the language specification.

I personally compile my code using g++. I want to know that it is as fast as it can be because my code will be grinding away 24/7 for weeks on end. (I started my current experiment at the beginning of August for example). I do not use a scripting language.

Offline Dan

  • N Forum Veteran
  • Broke the fourth wall
  • *****
  • Posts: 5662
  • Country: ca
  • Location: Longueuil
  • Gender: Male
  • Age: 34
  • Referrals: 1
Re: Before the computer age
« Reply #17 on: October 11, 2009, 07:13:30 pm »
Javascript.

Yes, you can do that with Javascript. At least with the Rhino engine. And I wouldn't be surprised if SquirelFish would also let you do that.


It's a definite choice to use that. The whole ethos of C and C++ is that you only get what you pay for. So for example, if I want a garbage collector, I have to either develop it or use an existing one. An interpreter is not part of the language specification.

C++ spec's does not have an agenda, you could implement GC in a C++ compiler. In fact C++0x (the new in-progress spec) have some stuff in it to make it easier to write a GC for C++ than before. You can write an interpreter or a compiler that is as wasteful as you want the spec doesn't care. The ethos you speak is very true among compiler writers but there's a huge difference between a language (including its spec) and its implementations.

I personally compile my code using g++. I want to know that it is as fast as it can be because my code will be grinding away 24/7 for weeks on end. (I started my current experiment at the beginning of August for example). I do not use a scripting language.

I do use g++ because Qt is too awesome of a GUI library to ignore. You might want to check Haskell though, in a multi-core reality it can beat the pants of C++.
"Politics is an ocean of toes" - Jacques Parizeau (1930-2015, RIP)