Intlib logo ScriptingLanguagesParadigmsDiscussion



This page contains discussion thread for the ScriptingLanguagesParadigms page.

I think it's a good idea to move discussions to separate pages. -- OlegFrantsuzov


So, you plan to create something like Perl in Cpp, don't you? -- OlegFrantsuzov


Yes, kind of that. In fact, we cannot import scripting paradigms as a whole into C++ because C++ is compiled and we don't want to have any lex/synt. analyses at runtime. We can, however, support the part of scripting paradigms which doesn't relay on runtime source code interpretation. Namely, we can create sophisticated string handling tools, like this: http://www.croco.net/software/scriptpp (in fact, scriptpp could be a good start for it), and also the tools of handling external processes, using the operators <, >, >>, , , && etc in C++ in their Shell meaning.

However, this task doesn't seem to be very complicated. As far as I know you, you could complete this in several days; may be you try something more interesting? ;-) -- AndreyStolyarov


I know one more interesting scripting language: ECMAScript Standard (aka JavaScript?). It has C-like syntax and everything in it is simple except objects. The main idea is the following: you can add/remove fields at runtime and methods are fields too -- you just use something like function pointers. I think it's quite interesting though I have no idea of implementing such dynamic methods. -- OlegFrantsuzov


Well, I'd say that JavaScript? is not a scripting language ;-) Anyway, it might be considered as another paradigm. BTW, adding/removing fields and methods at runtime is not so new; as far as I know, CLOS (Common Lisp Object System) can do similar things. -- AndreyStolyarov

CLOS is LISP, and JS is an imperative language. Anyway, I hope we'll work on Wiki. -- OlegFrantsuzov

Lisp is also an imperative language when we use both explicit and implicit progn ;-) And I'm not sure it is a giid idea to have such a capability in an imperative language; to my mind, an imperative language should be either low-level (just like C) or a ScriptingLanguage -- AndreyStolyarov


Also JavaScript? is very much like Python in that sense; as about me, I would find it much more interesting to implement something close to Tcl or actually some subset of Bash -- Dendik

Python is complex and a bit messy, whilst JS is small and elegant. And please explain which paradigm Bash uses. -- OlegFrantsuzov

[I'd say that Tcl is really a good candidate to clone, at least to my mind. Perl is designed by a phylologist and thus like a frankensteins' montster. Tcl is a popular choice in the field of embedded languages so it is well-known -- AndreyStolyarov ]

Perl is a programmer's nightmare, really. Python is a bit messy, and Perl is completely messy. :-) -- OlegFrantsuzov

[And about Bash -- it uses all the paradigms enumerated for ScriptingLanguages at the top of this page ;-) -- AndreyStolyarov]

Ah, sorry. :-) But I cannot seriously treat bash as a programming language. All these fi's and od's make me mad. -- OlegFrantsuzov

[Well, once I've coded a whole billing/accounting system for a middle-sized I.S.P. using bash and the command line interpreter of PostgreSQL?. It was ugly, slow, buggy and terrible, but there's one interesting thing about it: now when it is 7 years old it is still in use, which is a surprize even for me. Anyways, bash is a programming language -- AndreyStolyarov]

Bash is a programming (scripting) language, but it becames an ugly, slow, buggy and terrible PL for large projects. :-) -- OlegFrantsuzov

Doesn't EVERY language have it's own target area of problems? bash is VERY GOOD language for it's purposes: contolling of process behaviour in UNIX! -- Dendik

Please calm down, I don't want to conversate. I hope you don't think that it was a good idea to write "...a whole billing/accounting system for a middle-sized I.S.P." in Bash? -- OlegFrantsuzov

Why not? It's easy and it works (i suppose, that is AndreyStolyarov to ask whether it works or not). For middle-sized ISP speed would also be acceptable. sh is a language that can be used reliably when desired. Depending on exact requirements and structure of billing system sh may even be the best choice. -- Dendik

You ask why? Because "It was ugly, slow, buggy and terrible". You can write AI systems in assembly or drivers in Lisp, but every language has its purpose. Bash is for process scripting tasks, not for systems which work with money. I think. -- OlegFrantsuzov


InteLibWiki PageList RecentChanges PageHistory