Prothon - A New Prototype-based Language
Ben Collins writes "Prothon is a new industrial-strength, interpreted, prototype-based, object-oriented language that gets rid of classes altogether in the way that the Self language does. It uses the sensible, practical syntax and add-on C module scheme from Python. This major prototype improvement over Python plus many other general improvements make for a clean new revolutionary breakthrough in language development. Prothon is simple to use and yet offers the combined power of Python and Self. Check out the first public pre-alpha release at prothon.org."
A pre alpha release really isn't newsworthy. Is this some one's pet project? I wasn't aware Python was broken.
Thalasar
call it "Industrial-Strength" if it's "pre-alpha?"
All Your Memory Are Belong To Java
Need to? I find most people that brag about knowing a dozen languages never really use any one of them.
See also: jack of all trades, master of none.
Tom
Someday, I'll have a real sig.
Of course we need more programming languages. That is how we learn how to make programming languages better.
Sure, only a small number of languages become popular in the end. But that doesn't mean the unpopular ones don't have academic value.
Cheers.
newborn-infant-strength...
All Your Memory Are Belong To Java
I wasn't aware Python was broken.
Nor I... if one wants to create a new scripting language to overcome perceived weaknesses, why make it look 99% like something else that is already out there? Now if the goal were to be object oriented, extensible with C (or Perl or {insert your favorite language here}) modules, free of "brain-aching" complexity, easy to learn and fun to use, skip the Python syntax and make something with clearer scope termination, like say, a *proper* form of VB Script...
Thats a good question, but I would say that because in general (arguably because SQL is so limited) there has been a seperation of data storage and application logic paradigm. Its similar to why filesystems dont have lots of complex logic constructs built in to them.
You might question the eveolution of how much we push into the platform level though. For instance the hot libraries/tools people are playing with are things like object serialization packages, cheap DB replication, etc. These are places where application space is trying to address lack of evolution in data storage space and might be good candidates for new storage interfaces.
Just a thought..
Bottom line, someone wanted Python with prototypes. I'm not sure that prototyping -- creating objects from other existing objects by copying, essentially making inheritance a "first class" consideration -- is an analogy that's going to truly redefine the way I look at programming. Or let me put it this way, I'm not at all sure that the benefits of prototyping are going to make me want to restructure -- yet again -- everything I know about programming so far. I mean, after a certain point, programming is a job and I have to produce, not just theorize all the time about new approaches.
Also, judging from Sun's tutorial on Self, it doesn't seem ready for primetime, so I'd be a little edgy about "Prothon".
Prothon. God.
I dunno. This may seem curmudgeonly, but it is, after all, yet ANOTHER language ... Sigh.
Chr0m0Dr0m!C
I'm a bit of a 'language lawyer', so new languages that try to solve problems in interesting ways always interests me. So... I decided to give it a good reading. I got turned off IMMEDIATELY as I saw the following text:
;) )
"Unlike python, there is no 'global' keyword. Any variable name starting with a capital letter is global."
(Taken from memory... the prothon site is a bit slow at the moment, for some odd reason
That is NOT the sign of an 'industrial strength' language.
So why do you assume OOP is the better way to go? I don't assume that OOP is the better way to go. I know it is from experience. I work with a lot of OPC (other people's code for those who don't know the term), and let me tell you, working with objects is about 10x easier for maintence, and for adding functionality. OOP isn't an excuse to code poorly though, I will take non-OOP that is well written over OOP that is poorly written, however as most of the code I deal with is poorly written, the OOP does make it easier.
OOP enables you to easily swap out modules, or replace existing code. As long as you know the inputs and outputs of an object, it can be seemlessly removed for a newer version. This makes maintence much easier, and so long as public/private/protected conventions are followed, it can allow for some really smooth upgrades.
IMHO inheritance is an overrated feature of OOP, I primarily like it because it forces people to work in a black box model, which makes the whole problem of updates and bug fixes 100x easier for the person who has to deal with your otherwise crappy code.
I don't know Self but I do know Javascript and I find the prototyping OO method somewhat kludgy. Ok , maybe thats a facet of javascript and not the paradigm but give me classes anyday.
Sure , maybe they're a bit more long winded than prototyping but there a DAMN site easier to understand and follow when you're debugging.
If it ain't broke ...
<ducks>
Sticking feathers up your butt does not make you a chicken - Tyler Durden
(Yes, I know others have said things similar to this, I just think this is more clear; I read all the comments before the site came up and this juxtaposition still struck me.)
Is it dynamic (can I define functions at runtime)? Is it compiled? Can I easily write code that manipulates code? Are functions first class objects? Can I extend the language seamlessly?
Some new languages are interesting, but most are built by people who have used and understood far too few of the current ones.
Everybody's a libertarian 'till their neighbour's becomes a crack house.
In terms of getting data into and out of a database, how is sql in any way inadequate? The ONLY thing I can think of off the top of my head that I would love to see in SQL that is not currently there is the ability to use regular expressions in a WHERE clause...
Any way there is no standards defined for stored procedures, triggers, OODBMS etc, and even if there were, which vendor whould implement them and risk losing business to another competing products.
for the last time people, I am "frodo from middle eaRTH", not "middle eaST".
I don't mind indentation syntax (after all, all it really is is enforcing prettyprinting, something I do anyway), and having tabs only as indentation characters makes sense to me.
However, having character case be syntactically significant is a major botch. Case sensitivity was Dennis Ritchie's biggest mistake, and every time someone perpetuates it - or, as in this case, makes it even more significant - it just entrenches the botch even more.
Case sensitivity is wrong because people don't naturally think that way. In no natural language does the case of a character convey information that cannot be gained from context. I'm sure I'll get flooded with replies saying "but I do think of C and c as different!"...to which I'll reply by asking, "But did you, before you learned C/Unix/whatever computer language or OS first required you to pay attention to character case?"
I predict that this will be a rich source of bugs and programmer frustration in Prothon programs, just as it is in C. That assumes, of course, that Prothon ever makes it out of the Sourceforge page and into the real world.
Disinfect the GNU General Public Virus!
Those of us who are unfamiliar with these {dynamic | scripting | kiddie | hack| toy} languages but curious about the classless way of working are not really helped by this document.
If you go to Suns Java site, they don't say "If you are not familiar with C++/Smalltalk, you might as well fuck off."
Similarly Microsofts site for C# doesn't say "Go learn Java, and then find out about GOTO, and you might have a prayer of understanding this."
A good intro with no dependencies will help build momentum for your project.
${YEAR+1} is going to be the year of Linux on the desktop!
The good parts are the implementation: multiple interpreters (no globals), stackless, gc running in separate thread and generally a clean implementation from scratch.
The bad part is from a language design point of view it's a hodge-podge of small yet significant changes from Python, almost none of them, IMHO, an improvement over Python. Those that may be considered a slight improvement are hardly worth breaking compatibility for.
Significant case? Another type of comment? for i in 7 ? a differnt keyword to define generators? Return self by default? removal of class statements for javascript-like object orientation? WTF?
The Python implementation could definitely use an overhaul. The language itself has a few minor warts but strikes a fantastically well-balanced sweet spot that will be difficult to beat. I just can't see the real justification for these changes other than "because I can".
Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
Yeah , thats legal. The problem is with the code_t definition , not the [].
well sorta I guess. An analogy would be if a carpenter claimed to know how to use all tools of the trade yet never actually builds anything.
I dunno, I take this from experience. At school many of my friends put on their resumes that they can "code" in C, C++, Perl, Java, Javascript, PHP, etc. yet haven't accomplished a single thing in any of them outside of the usual lab assignment.
While new programming languages aren't always a bad thing they have to serve purpose. Perl in my books is cool because it's a fast and expressive language that has handy string/hash/array ops. But langs like Java/C++ really are just a dime-a-dozen. Might as well stick with C for compiled languages...
Tom
Someday, I'll have a real sig.
Well, no offense but you're stupid. Especially as it probably comes without even trying and without explanation.
Using {} for block structure is the work of a mad-man. I'll never willingly use such a "programming" language.
There's really no difference between those equally idiotic statements. It's just about what you're used to.
"Prototyping" doesn't just mean "to make prototype applications"
Prolog
Keeping
This is a joke right? Prothon like a bad marriage of Javascript's broken object model with make's broken 'you can only use tabs' rule. Python has it right - whitespace should be whitespace, and explicitly defined objects are good. Prothon is a needless step backwards, and a pretty foolish one.
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
You don't seem to understand exactely what SQL is and your comparison to COBOL is not apt.
First of all, SQL is a declaritive language not at all similar to an imperitive language such as COBOL. SQL is based on a formal query language called Relational Calculus, itself is a subset of predicate logic. The point here is that SQL is based on definded mathematical properties that are then underpinings of relational databases.
SQL is also not just a language for issuing queries, it is also used to define database schema. In this vein its theorectical underpinings allow for the application of normalization theory (or decomposition theory if you prefer) to allow schema to be analysed for redundancies (which can have huge performance impacts).
Check out a book on Database and Transaction theory if you want a better grasp of what goes on under the hood of RDBMSs.
As for NewSQL, I have never seen something so braindamaged (OK, I have. But it's been atleast a week). It basically throws away a significant portion of the power and elegance of SQL to create a query language that looks at best to be a hacked up version of the JDBC API. But even then they are still 'brainstorming' syntax; the project is nothing better than a half-formed thought. Not to mention the serious flaws in the arguments they put forward in their reasons for 'creating' a new database query language which are not even worth wasting the time to refute.
One thing that annoys me about Python-like languages that this new language seems to keep is the reliance on space-count indentation. If you switch editors or share a lot of code, then spaces mixed with tabs can cause a lot of confusion because there is no standard interpretation for how many spaces a tab is.
I agree that it makes the code smaller, but at the risk of code sharing problems.
Table-ized A.I.
Just in case no one else noticed this, figured I would point it out. The parent points out that thy are unfamiliar with the two languages and also evaluates them as {their list here} languages.
2 points for ignorance!
Whee signature.
Any language that uses whitespace or backslashes for line continuation is madness. This 2004 people. Write a damn compiler that can do the thinking, don't make me screw around with formatting to get my program working. Moronic. Stupid.
This is as logical as saying: "Any language that uses curly braces for block delimiters or semicolons for statement delimiters is madness. This is 2004 people. Write a damn compiler that can do the thinking. Don't make me screw around with punctuation to get my program working.
The whitespace and backslashes are not in addition to something else that unambiguously describes the structure. They are instead of the stuff that other languages use (curly braces and semicolons).
I've been paid (as in, it was part of my job at the time) to write code in: APL, Assembler, Basic, C, C++, Cobol, Fortran, Java, JavaScript, Pascal, Perl, PHP, PL/I, PostScript and SQL (plus variants of some of those), as well as job control languages like JCL and WFL, simple scripting in sh and csh, several proprietary application-specific scripting languages like MITS, SPSS, GML and GSL, and miscellanous markup languages (troff, formal, HTML, XML, rtf, etc). And a half-dozen different text editors (CANDE, Teco, FIX, vi, emacs...)
I've probably left a few out, and that's not even mentioning languages I learned incidental to a class assignment (GPSS, Simscript II and Simula for a course on discrete event digital simulation, SNOBOL for something on text processing, Lisp).
The point is not to brag, but to point out that any professional software developer should be both expected to know several languages and should expect to learn and use several more over the course of his career. (But if you're going to mention it on a resume, give some indication of skill level -- expert, experienced or just "I wrote a 'hello world' in it once"?)
A mechanic is expected to have a pretty complete toolkit, with both metric and imperial wrenches, slot and Phillips and Torx screwdrivers, etc. -- and in Canada, Robertson screwdrivers too. (OTOH, he probably doesn't need a left-handed blivet impeller unless he's just into collecting tools for their own sake.) Somebody designing a product to be built -- whether a machine or a software system -- needs to be aware of what tools and materials are available to build the product with, and to maintain it. (In this regard progamming languages are more like materials than tools, either way they should be chosen for their properties.)
-- Alastair
In no natural language does the case of a character convey information that cannot be gained from context.
;-)
Glad you added that qualifier. But the whole point of programming languages is to minimize the amount of context (read, "redundancy") needed to make the meaning clear.
Now you can go back to putting a polish on your Polish sausage
-- Alastair
Let's not over-generalise, eh? There are plenty of things that don't fit neatly into a purely OO form as commonly supported by major OO languages, and I'm not just talking about functional programming techniques. Not everything is an object (in the OO sense), simple as that.
It's certainly true that many people don't understand the rationale behind inheritance and polymorphism, both of which are key components of object oriented programming. It's also true that these features are heavily over-used in some systems as a result of that lack of understanding, leading to "clever" designs that are actually harder to maintain than a completely non-inheritance-based system would have been.
The key advantage of inheritance/polymorphism in an OO design is really just a well-defined structure for implicit type conversions. If you're not using polymorphism, there's usually not much point in inheritance either. (You could achieve code reuse using aggregation instead, without all the overheads of having a whole class hierarchy.)
However, without inheritance and polymorphism, you're not talking about OO. You're advocating modular design and/or the use of abstract data types (OK, those aren't independent concepts). I've often heard a data-centric approach without inheritance and polymorphism called "object based" programming, which strikes me as quite a good term for it.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
I do a lot in VB and that is not because I like the language, but because it has such a good IDE (read intellisense). If I had to program VB in Notepad /Emacs/ whatever, I would slow down by at least 50%, probably 75. You can never convince me that this new language will deliver a better productivity gain then designing a Python IDE which knows all your classes and does auto-complete.
10 ?"Hello World" life was simple then
"There's really no difference between those equally idiotic statements."
Wrong.
When was the last time you saw a mail client fuck up your braces?
When was the last time you saw an editor decide to insert a different character than a brace when you wanted to insert one?
When was the last time a web-browser rendered a brace in such a way that the mouse couldn't drag/select it?
Never, never, and never.
However, all the above can and do fuck up white-space.
THL.
Keeping
Having examined this language in some detail, I'm a little disappointed by its design.
1. It makes overly heavy use of punctuation. I'm of the opinion that languages need to be more human-readable, not less. Put another way, the speed and power of coding in any language is not gated by the number of characters it takes to type out a statement; it's gated by the time it takes to find and detect bugs and flaws. Words > punctuation for readability.
2. Many of the design decisions are obviously influenced by one person's peeves with existing languages. The world already has one Larry Wall, and as wonderful as he is, we don't really more Larrys.
3. Elegance is a hard thing to measure, much less quantify. Still, aside from simply being a unique language, it doesn't really offer any new elegance to the concept of what a language should do.
It's an impressive hack, to be sure. I'd be proud to be able to show off a body of code like this, for its demonstration of sheer technical strength. But I find its artistic merits somewhat lacking for my own tastes.
Derogatory or condescending salutation. Quasi-religious statement of love for Lisp.
Laundry list of several nifty Lisp features. (It doesn't really matter which ones.)
Implication or outright statement that every feature in programming language in question has already been implemented in Lisp. Subsequent dismissal of language in question.
Remember, in writing your post, it is essential that you adhere to the following guidelines:
(Disclaimer: I like Lisp. Actually, I love Lisp. It really, truly is incredibly awesome. It's just Lisp users that drive me crazy.)
<ducks REALLY low>
There are more than that. Here's one: Xplain. That page describes a converter to SQL, so you can write Xplain queries and make them against a standard DBMS. I don't know much about this language, as I just learned of it recently.
There are many others which are not based on the relational model. It's difficult for me to take them seriously, as the relational model is so powerful.
SQL is so old, it hurts. It's basically COBOL.
I don't care how old it is. What's wrong with it?
By "is basically COBOL", are you complaining that it favors words over symbols? I do not find this to be a problem. My SQL queries are short enough and a small enough part of the whole program that I prefer the clarity over any additional possible terseness. COBOL is different in that whole programs are written in it.
If I were to make any complaints about SQL, they would be:
values (value_a, value_b, value_c) ...which looks okay there, but gets hard when you have too many columns to fit on one line. Versus insert into table (column_a => value_a,
column_b => value_b,
column_c => value_c which is always clear.
select 'foo',
'bar',
column_c
... versus insert into table
select 'foo' as column_a,
'bar' as column_b,
column_c
...
$sth->execute($foo, $bar, $baz); versus $sth = $dbh->prepare('insert into mytable values (:foo,
$sth->execute(foo => $foo,
bar => $bar,
baz => $baz); I think the placeholder syntax is not actually specified by the SQL standard, but it should be. The '?' syntax is dumb. The named syntax should be mandatory. In most DBMS/API combinations, only the '?' syntax is available.
Not completely true. Seeing _whitespace_ is impossible; seeing _indentation_, however, is extremely easy. In fact, it's enormously easier than seeing { and }; consider the fact that many C bugs are of the form...where "do_that" appears to most people to be conditional, but is actually unconditionally executed.
-Billy
Not to mention Danish and danish ... one is a language and a nationality, the other is a pastry.
We do not live in the 21st century. We live in the 20 second century.
I've been paid to code LISP in the past, and it's a great language & one way to do things, but I wouldn't want all languages to do things the LISP way. In the past 15 years I've found more fun in coding in other languages and am coding Ruby now for my own projects. There's other languages involving less typing than LISP to get a particular job done. Why should someone pollute their mind with one mindset before inventing something new?