Designing And Building A New Pragmatic Language
ctrimble writes "A bunch of folks on the pragprog Yahoo! Group have banded together to design and implement a 'pragmatic' programming language. Ostensibly, the language is informed by the principles in Hunt and Thomas's well-received book, The Pragmatic Programmer: From Journeyman to Master but the purpose of the language is to help ease some of the pain of development and bridge the impedance mismatch between the academic aspects of a programming language and the discipline of software engineering. The design is still very much in flux. If you're a programmer, this might be a language you'll be using in a few years (or earlier). This is your chance to get in on the ground floor. What kind of features do you want the language to have? What are your PL pain points? Where could this language do better than existing languages?"
In my mind, Perl is the ultimate pragmatic language. Quick and easy with little attention paid to consistency and orthogonality. I.e., not a "theoretical" language.
I haven't read this book and I can't find any info at those links. What is a "pragmatic language" and why don't any existing languages meet the definition?
they should explain why ruby, python, perl, basic, java is bad.
they should come up with some good improvements for a specific language.
the world doesn't need an entirely new language. (we already have python).
... they only thing I can think of that would be missing is a compiler to turn Python into machine code, and I'm sure somebody is working on that.
I'm going to have to see at least 3 years of Apocalypses and Exegesis before I can make an informed decision about this language...
Karma: Marginal (mostly due to the border around the website)
Strong typing: I'm tired of seeing casting errors at runtime.
Metacode/macros: Sometimes I would like things done at compile time, especially if they have to do with types.
Overloading: Can be implemented with a decent macro system.
OO/functional: So many languages miss one. So few have both (Eiffel, O'Caml)
So many languages are so close, especially ones w/ active user communities, like perl and C++. They're just not there yet . . .
Definition of pragmatic
1: concerned with practical matters;
2: of or concerning the theory of pragmatism
3: guided by practical experience and observation rather than theory;
extern int work(); extern int go_home(); main (argc,argv[]) { int employed; int not_dead; while ( employed && not_dead ) { employed = work(); not_dead = go_home(); }
Ross Youngblood
We have PLENTY of generic memory moving, scriptable, and interpreted languages that can all perform the same command line batch processing.
I think we need a language that not only performs those operations but is built with Cross-platform GUI design in mind. I don't know HOW or even it it is simply another part of the standard libraries, but I think you you REALLY want you rlanguage to be successful it should be able to hook into existing GUI APIs and/or implement its own with ease and consistancy. If anything a strong enphasis of a GUI library is a must have.
Delphi (MAYBE VB) is the closest thing I have seen that allows this. Yes I know the "language" is object pascal, but the IDE allows for quick and semi-graceful GUI design.
In addition to that if you could implement a pointerless environment with automatic garbage in a FAST way it would be helpful...but allowing for manual overrides if necessary.
Let the elitist flames begin.
First thing: read Tony Hoare's critique of Ada. (CAR Hoare, Hints on Programming Language Design, 1978). All the current common languages are way too complex.
...) in the last 20 years that decided this was just too hard, and eventually paid for it.
Second, make sure the language has a formal semantics from the start. This semantics needs to include concurrency and how it works. I can think of half a dozen languages (Ada, C++, Java,
Third, make sure that the notation either explicitly uses files, or is completely independent of files. Probably the most annoying aspect of Java is that the package structure implicitly depends on a directory hierarchy (but some OS's don't have hierarchic file systemss) but doesn't deal with package structure in anything like the way hierarchic file systems do (what does 'import java.*.event' mean?)
Fourth, write a lot of sample programs, and test each with experienced programmers, saying 'what does this program do?' If the programmer doesn't get it approximately right, rethink the syntax.
Also, minimize the feature set provided by the language; provide a small set of flexible features, like macros (the ability to alter the parse trees manually at compile-time). I don't like C because I have to keep track of a thousand different concepts to understand its code.
Also, a strong standard library for things like strings and sorting, so I don't have eight million choices.
Wow, a lucrative publishing contract! I don't have to be evil anymore. --Meteor
Just give me Lisp with some syntactic sugar, a nicely standardized interpreter and library, and a wxWindows port.
I'm not sure we need another text based language ( ok, I'm not actually a programmer - just dabble a bit ). But isn't it about time we had a graphical language. After all, most software designs do utilise graphs of data types and flows - UML?. Not sure how it would work, or how it could be more than a glorified flow chart. But it may end up being easier to program debug etc. After all - a pictures worth a thousand works.
Every language feature has use. Pointers, references, pointers to pointers, pointers to functions, reflection, OO, templates, multiple inheritance, interfaces, enforced contracts, garbage collection, manual resource management, virtual machine, native execution.
All these features have uses. There is always 5 cases for every single one where it's *much* easier to implement while using it.
Now abandon backwards compatibility and think up reasonable syntax. I don't know if it's possible to do an elegant language with all that, but if it is, I think we should have one. Every other language lacks some of the above features. I would like to see a langauge that really had everything.
that there is no "one language", there are multiple languages for multiple purposes, and the boundaries between languages are often blurred (just like everything else in life).
in addition to making your case (as stated by other poster), also
- what particular context/problem are you trying to solve;
- what are the specific characteristics and issues in that context/problem;
- how does your new language provide a better solution than other solutions;
- how does your new language stand up on theoretical issues (looking at the science of design of languages themselves)
if there's an existing well used language that is "close" to what you want, and such language has quite a following/momentum, then can you try to adapt/evolve it rather than creating a dud language that goes nowhere (a waste of time for everyone). do you really need a new language, or do you need to help educate on the use of an existing language (i.e. are you more about process than product).
- Strongly typed. Or weakly typed, but have a smart compiler that could figure out what you mean. (Java/.NET)
:-)
.NET is a hack for WinForms and you could probably sneak it in Java, but there should be something that easily catches everything).
- Generic design patterns that you could "plug" into via some sort of object and run from there.
(Sorta future Java/.Net, but more ambitious).
- *Simple* GUI classes included to get a GUI up and running (old VB). Facade pattern to get under the hood and hit native libraries if need be. (SWT, perhaps, but that's a stretch)
- A GUI library that reads XML definitions either at design/run time as well. (Mozilla)
- No monster corporation owning it. (Python and other OSS!)
- Braces (Java/C#) - optional Python
- A language that *forces* refactorings, i.e., you can only have four temp variables per subroutine, loops that can only span so many lines, etc.
- With/End With syntax (although, again, if you refactor properly, you don't really need this).
- Checked exceptions (Java).
- Centralized error handling (no language really does that natively -
- Did I mention OOP? That *has* to be there.
- Allow for global spaces. Singleton/Borg patterns are messy. Sometimes you just want to declare the damn thing and be done with it.
Would I want speed for all this? It almost doesn't matter because we have chips that are nearing Mach 3.
There's my list. When the language is done, let me know and I'll shell out (or sell out) for it.
This space for rent.
Get the book free while you can; it's gotten high praise, a real treat for getting a wide view of different styles of computer programming. It compares favorably with SICS.
Someday we'll all be negroes
Why stop there? We need as many languages as we can get, especially in today's economy and job market.
What's the point of designing a better programming language when I have to use C++ anyway if I want to work.
Dylan and Objective-C are examples of really good languages not widely used for commercial development, unless you are a Mac programmer doing cocoa with Obj-C. (I have recently been lucky enough to be writing code using Objective-C++ for a living!)
C++ is not the best language in the world, but its not terrible and I've been able to consistantly find work doing C and C++.
Avoid Missing Ball for High Score
Generic design patterns that you could "plug" into via some sort of object and run from there.
- if-I-had-to-use-them. *gasp* sorry, had to toss that one in. ;-)
For what it's worth, either you can trivially do that now (like Singleton), or it's effectively impossible (like MVC). IIRC, "the" Patterns book explicitly disclaims the possibility of this, because they're just too high-level.
As a concrete for-instance, Python has first class support for "Iterators". But they are very specific iterators, and there's a discussion going on right now in the newsgroup about a slightly different sort of iterator, one that you could tell was empty. The type of "iterator" Python natively supports can't do that (it's a minimal commitment iterator, meant to be used in situations where you may not know whether the iterator is empty until you try it, and I've used this property before), yet that doesn't make it the One True Iterator; there's a place for iterators that know they are empty, or can be rewound, etc.
If that's the kind of support you want, you can have it, but that's not really full Pattern support, more like Pattern-inspired features.
I'll refrain from most of my other criticisms since they are matters of taste... oh hell, Bruce-Eckel-on-checked-exceptions-I'd-kill-myself
Give me both OO abstraction and powerful bit-twiddling capabilities. If I want a 29 bit variable type, dammit I want a 29 bit variable type. Give it to me and let me do all kinds of low level stuff like shift three bits and mask it and treat the first 3 bytes as a unit. Then let me encapsilate that in an object oriented lock box.
The language MUST have these things built in: associate arrays, regular expressions, iterators, introspection, "here" documents, both static and dynamicly sized arrays.
The language should be database savy. This means implicit SQL cursors (like in SQLJ or PL/SQL) so that I can say something like
I agree; we need something that's designed from scratch to compile. However, we do have a few options already. Most notably, there's perlcc, which compiles Perl into C code and then compiles that into machine code.
I've thought about this a bunch over the last few years. IBM has the PL series of languages. PL/S and PL/X were deamed "strategic" and as such they were never standardized outside IBM, yet IBM continued and still continues to use them for different tasks. There are reams of code written in them and REXX, another IBMism. Lucent has a dozen languages for their own use. Modula-3 started as a DEC thing before is was kind of opened to the world (damn beautiful language I might add, if only more people used it and DECpaq-Hewlet relicensed the gcc front-end code so we could integrate it..) MS has their BASICs and now C#. And numerous other companies have found it either advantageous or some engineer got it in his head that it was a good idea for them to produce their own custom langauge and that they could produce apps in it faster than by using off the shelf components. To some degree I think it's true, you'd be surprised at some of the REXX that holds the world together. I've kind of thought that it was time for an OpenSource language of sorts, there is perl, python, ruby and others but something that can be compiled in to real high performance object code and something that helps us solve the problems we run in to.
I'll tell you what I think would be killer, in my rambling sort of way. Syntax is key just because people are picky about it, something java like would be great. Make it a front-end to gcc, this gives it a sense of credibility and support and a great optimizer and platform support. Build it so it can easily link with C code. Give it bounds checking and type checking. I thinking it will be very C like for the most part; have that light weight feel to it where you can see the opcodes that the compiler is going to produce as you write in it. Give it objects and classes, but make it light weight on the syntax, building new classes in java requires a new file, doing it in C++ can be feel like lifting the titanic some times because it's proper to add headers as well as implementations. Then with the standard class library, it needs some fundamental object classes like strings (I can't believe how long it was for a standard C++ string class to exist, i've use about a dozen different ones prior...) and sockets (make OpenSSL as close to a boolean flag as you reasonably can...) probably some others I'm not thinking of at the moment. Keep them lean and mean like they are in C but beef up the areas of weekness. Some sort of regular expression engine should be available also.
For example, strcpy shouldn't exist or there should be some kind of type checking to verify that the inputs are indeed strings and it allocates memory. memcpy is missing several arguments, notably the source and destination sizes. I can probably list dozens of C and C++ problems are aren't language issues so much as library issues that have realworld impact and cause real problems. Now the first class objects that are passed in to strcpy or memcpy (whatever they get called in this new language) could have the missing pieces of information or the API can be built to support it. Basically, I'm suggesting that we add the few instructions it takes to do bounds checking, it's simple code to add to a c compiler. Let's get rid of buffer overflows as much as we reasonably can with the under lying language. Now if you want to do tricky shit with pointers then so be it but if you use standard language constructs (functions will have in and in-out parameters like the C++ & qualifier.) then you should be pretty safe from buffer overflows. With good type checking and such w
I think that Alan Kay was way ahead of his time - getting kids to program. I think much like the spreadsheet revolutionized office work by allowing dynamic analysis of data the next big language will be one that is simple enough to allow average office workers to speed up and automate their own work. Abstraction is key.
= 6543
VBA is being used currently for a lot of that work - but it is truly horrible. Wharton has started teaching its MBA students Python.
Check out what Paul Graham has to say about programming languages in 100 years (basically they won't change much).
http://www.paulgraham.com/hundred.html
And Artima had a discussion on this topic, "After Java and C# - what is next?". http://www.artima.com/weblogs/viewpost.jsp?thread
I offer as the pragmatic language of the future, Toadskin. It's all you need. It has all the power of BrainF**k and all the friendliness of Forth. So let's get those HR systems ported folks!
[-- Trust the Monkey --]
The worst missing features in most programming languages that I sometimes have to use:
- lack of sum types. Languages have long offered conjunctions (structs in C, tuples in python). Disjunctions are equally useful. (With it, a function could return one of two possible types. The overuse of 'null' as "the other pointer" in C/C++/Java accounts for a tiny corner of the possibilities here.)
- lack of higher-order, nested functions. You can do so so much with functions once they are first-class in your language. All this stuff about iterators over containers in Java and "I want SQL built into my language so I can say for each employee in query do" is subsumed by map/fold operations and higher order functions, for starters.
- lack of safety. Man, I sure hate tracking down memory corruption bugs, and I sure hate it when there's an exploitable security hole in my or someone else's code because of them.
I already have languages with these features and more, so I don't need recommendations. But if your new sparkling language doesn't have these features... then what are you doing?!?
No, C++ is in fact terrible.
I have been in a jillion language and paradigm wars over the years, (Itsa hobby of mine :-) I have come to conclude that many aspects of programming and languages are purely subjective. What floats your boat may sink mine and visa versa. People process symbols and patterns differently in their head. There is no one right language.
It also seems that committee-designed languages usually fail because they compromise so much that they don't "sing" to any one group. You need a fan-base to get a language to take off. But, this also means catering it to specific mental types.
That being said, I have documented a bunch of potential scripting language features and give justification for my favorites in the list:
http://www.geocities.com/tablizer/langopts.htm
You may not agree with my decisions, but there is plenty food for thought for anybody researching and collecting lists of language options and alternatives. (I don't cover staticly-typed languages because I don't really like them.)
Table-ized A.I.
Man. Anybody else tired of keeping up?
It's sad, but I believe this will fail horribly. The past has shown that "committee" languages don't succeed (or at least only in some niches, like Ada).
In my experience systems (like PL, applications or even OS's) are best when designed by just a small group of people: not too few and too many (I guess four to six people is a good value). Too few (just one or two) tends to include just the exclusive view of thing from the designer, while too many just makes a great mess since it's hard for a group of people to settle on one point.
Another thing I learned while reading some of the stuff about C and its history on dmr's homepage is that languages which are defined first and implemented later often hold some promises in the form of "in theory this should be very elegant and nice, but it turns out to be annoying or very, very hard to implement".
dmr also said one of the reasons C succeeded was because it was created to fit a need, not to make a point or as demonstration. So if there is need for some features then this project might succeed, but I don't see any striking needs any more, there is already a PL for almost every problem out there (and interestingly nearly every PL out there is very strong/elegant in solving certain problems but fails horribly in others).
But nonetheless I wish the people participating in this project all the best, if they would come up with an interesting, useful and beautiful language that would make an improvement to the PL world this would be a very cool thing :-)
Argh. Stop it already, Common Lisp already exists!
I think I understand where you're coming from, and I agree with the principle, although I don't entirely agree with exactly what you've said.
I think the issue of how libraries are handled is crucial to the success of a modern programming language, as numerous success stories and famous failures can testify. Here are a few random thoughts; how do they match up with yours?
Firstly, I agree that it is best to keep a small "kernel" standard library. This library should be very well designed, with as much thought put into it as the language itself. In particular, it must be readily extensible by other libraries without being overcomplicated. If you like, it should provide a framework for doing common programming tasks, without filling in too many specific cases.
However, I don't think it's either easy or desirable to separate libraries completely from the language itself (as in syntax, grammar, etc). Your own comment about C++ is wrong, for example: you cannot ignore the standard library completely, because certain language operations (such as a failed dynamic_cast on a reference type) result in behaviour that needs library support (throwing an exception of a type defined by the standard library).
Now, you could get around that by creating new standard types for such cases, but do they really belong in the formal grammar of the language, alongside normal exception behaviour but distinct from it? The point is, from a programmer's perspective, it doesn't matter whether that exception type is in the library or the language. It should function identically, offer the same interface, exhibit the same behaviour, either way. It shouldn't matter whether my string type is part of the language or part of the library; it should just work.
The same goes, to a lesser degree, for other libraries. Once I've decided to use a library (or part of it), that extra functionality should just be there. I shouldn't have to care where it came from, and the only time I should have to know it's in a library is when I'm identifying the functionality I want to use. The syntax, style and function should be just like any other feature of the pure language and its standard library.
As a final point, while I believe the standard and portable library should be compact and highly flexible, it's obvious that having a widely recognised and comprehensive library of commonly used functionality is advantageous. Look at the success of Java, for example; although many of its standard libraries suck compared to alternatives for other languages, or even replacements available for Java, that doesn't matter to many Java programmers, because they're good enough. OTOH, this results in suboptimal code due to laziness and/or lack of knowledge of alternatives on the part of many Java developers.
The solution to this, IMHO, is to follow the path set by Perl (CPAN), TeX (CTAN), etc. The sponsors of the language -- commercial or community -- should provide a well-known and recognised central repository, into which contributers can add their own offerings. Better yet, adopt a genuine community review process, such as the C++ Boost community has, to force higher standards within the libraries in the repository.
So, in my ideal little world, a language would have a structure such that libraries and language were indistinguishable except where identification is concerned (basically just a matter of how to specify which libraries are desired, and naming conventions to prevent clashes between them). The language should come with a standard library that provides really common features (basic math functions and string handling, for example) in flexible frameworks on which other libraries can build. The bulk of library functionality shouldn't be standard -- that's too invasive and too limiting -- but ideally should be collected in a central repository of peer-reviewed offerings, with simple, standard and widely known conventions for using those libraries in programs. This way, no-one uses substandard code by default, but you still have the comprehensive functionality base there when you want it.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
I agree entirely with you (and Brooks) that syntax is just a means to an end. What's important is the underlying models behind that syntax. Today's models -- be they procedural, OO, functional or whatever -- lend themselves pretty well to textual representation. You could perhaps advance things a little with graphical representations, but I suspect the place for that sort of thing is in better development tools, rather than the definition of the language/environment itself.
The interesting question about graphical or new development environments is whether they'll make it practical to use more advanced underlying models that don't lend themselves readily to a textual representation. I've come across examples of this sort of thing at various points in my programming travels -- the concepts of interfaces, polymorphism of various sorts, modularity and access control come to mind as things that are inadequately represented by most of today's textual languages -- but never anything substantial enough to justify a shift to a radically different representation.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
What could any programmer want that isn't already in Common Lisp or Haskell?
I think Java is good. It fails at some points (this is by a person with 3+ years of professional Java experience): ...
.NET if necessary. Thus, you can target 3 platforms with an ease.
1) No convenient way to call methods by name. Takes quite a few try-catch constructs, etc. What about this snippet:
Object x =
call someMethod(a, b, c, d) at x;
or something. Ok, it may throw any necessary exceptions.
2) No standard way to access DBs. JDBC is a pain. It works, but with lots of workarounds for different dbs. One must implement class loaders, selecting the driver at runtime is terrible, parsing the CREATE statements to replace the data types is way out of bounds.
3) Terrible with memory management, especially the GUI stuff. There just HAS to be some efficient way to deal with this. Maybe mix GC with ref count + explicit delete statement, which zeros all references to the object (possible with the current Sun JVM implementation, because the references are one step further).
4) No way collect a few threads, name them an "application", then kill them off. Oh, there is, but you have to worry about bizarre deadlocks resulting from unsent notifications, etc.
5) The localization is a PAIN. You must write properties files, compare locales, etc. i.e. do all the work by hand. And there is always the temptation to hardcode a string in a hurry.
6) Nothing really to force you to avoid deadlocks. Some ideas : throw exceptions when deadlock is reached, etc.
I love the idea of OSGI (my company, ProSyst, is a lead vendor of the OSGI framework). The idea is simple : jar files, called bundles, export and import packages, and register services (objects implementing interfaces both the user and the exporter have access to). Problems : no way to completely kill off (safely) any threads the bundle might have started when it is uninstalled.
Some suggestions about the new language:
1) Add call-by-name.
2) DB support. I saw one message before this one which was very well thought out, and was on this subject.
3) Add ref counts and explicit delete-s to the GC
4) Borrow ideas from OSGI - easy plugins, services, etc. Runtime load/unload of components. Runtime SAFE kill-off of entire bundles. Kill their threads, close their files, free their memory. This is done (sort of - the memory freeing comes to mind) with win32 dlls, but no way to do it in Java
5) Add localization support. For example, some library class which loads the appropriate string tables according to the locale (the easiest solution)
6) Two ideas here : 1) force the monitor objects to be declared beforehand, and assign priorities. If someone tries to lock these objects out-of-order, throw exceptions. 2) throw exceptions when a deadlock is reached.
more things to think about:
- realtime support. Threads which cannot allocate memory, and can only use static memory.
- good cross-platform gui. Swing is a great idea, I mean its programming interface, no the terrible self dead-locking, ugly implementation. Having platform-dependent look and feel (I *mean* native look and feel, not some "lightweight" blown-out implementation, which slows down to a crawl at the simplest operations). See previous thoughts about deadlocks.
And about templates : I do not care, really (oh, the horror). Typecasts are not a problem, when you only have one or two types of objects in the same collection. I even prefer there not to be such.
Now, about the platform:
How about have the language compile to C or Java (make it an option). Then, make an option to disable the garbage collector (impossible for Java, but a valid options for C). If you compile to C, make sure you use a serious GC, not a conservative one which treats all your data as pointers. Use a Java-like type system. This can even compile to
-- bailing out.
A language with sound underlying models, with simple implementation, which helps me do what I want rather than telling me what I want to do, and which has no dependence on today's buzzwords.
I think I'd hate your language. :-)
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
I think the problem today is that everything seems to be moving on much faster than it actually is.
Quite a few years ago, I learned to program in C and x86 assembler. They were useful at the time, and I learned a lot about structured programming and such while using them.
Several years later, I learned C++, and encountered OO for the first time.
At university, I discovered things like Java and ML. ML was new and interesting, but at the time Java was just underpowered C++ with a heavyweight standard library, and to a large extent it still is. That was when I realised that many "advances" that come along "at breakneck speed" aren't really any different to what you've already got.
For several years at the start of my professional career, I relied on little more than standard C++ and a few very common libraries (MFC, mainly, and some in-house things). I didn't need any more.
After a while, I got the feeling I was stagnating, and since I wanted to do a few things that weren't convenient with the C++, I went out and learned some more.
In the past couple of years, I've learned to generate HTML with XML/XLT, I've learned to write scripts in Perl, I've learned about server side scripting and CGI, I've learned to use MySQL, and recently I've put it all together and written a pretty solid bulletin board web site for a club I help run. And this was just with a few hours now and then out of curiosity; the day job writing back-end C++ without much whizz still pays the rent.
I guess my point is that three years ago, CGI, MySQL, Perl, XML and all the rest were just buzzwords to me. Everywhere you looked on the Internet, there were millions of pages of tutorials, mostly very bad ones, and people telling you it was the next great thing, radically different to all that's gone before, etc. You know what? I learned the basics of each of these things inside of a day, once I actually sat down, did some real homework to track down a decent tutorial and got on with it. None of this stuff is hard. Just find useful info -- which often still comes on paper, or in the form of docs from the tool provider for high calibre things like Perl, MySQL or Apache, and not from random glitzy web sites and magazines -- and do some reading.
I reckon if you have a general knowledge of programming in procedural, OO and functional styles, a bit of experience with database design and SQL, a bit of web savvy and familiarity with mark-up, and some general knowledge of modern computers, you can learn any of the buzzword technologies in a week, maybe even a day. They're really not very clever at all; the reason they're buzzwords is that stupid people talk them up to make them sound clever.
Keep the faith; if you've got solid basics -- as any old-timer in this industry probably does -- you're never far behind the lead edge if you choose to catch up. The only people who claim everything is advancing at lightspeed all the time are marketroids selling new buzzwords, and impressionable kids too new to the business to know any better. The rest of us can well afford to relax, keep an eye on new developments now and then, and simply learn whatever tools we need to do what we want to do, if and when we need them.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
I keep thinking about a language where definitions (objects, classes) and procedural logic (functions/method calls) would be expressed in XML.
XML schema might come in handy.
Such language will be exclusively machine readable and WRITABLE. Imagine the possibilities.
If someone wants to run with this idea, I want 10%.
1. Languages should be complex. Life is complex. Since a large chunk of programming relates to life in some way it's nice to have a language which can handle the nuances easily.
2. I think programming languages should be allowed to evolve for a bit. Write some programs in it befor you lock it down. Invite your friends to use it. Then you'll know what sucks and needs changing. Concurrency will progably find a way to hurt you no matter what. It makes things messy. Expect pain... be suprised when it doens't come.
3. Hierachies are ok but "file" notation should be avoided if you care about portability. Remember, DOS uses '\'; Unix uses '/'; other things use otherthings. Pick something simple an deligate the problem to the compiler.
4. Yeah running it by experienced programmers is probably a good idea. You may want to run it by inexperienced programmers also.
1. Languages should be complex. Life is complex.
I kinda was hoping for something that wasn't as much of a pain in the ass as the rest of my life.
I didn't realize it had been the subject of an article here already.
Someday we'll all be negroes
Of course READability is important; but what about writability (and in particular, typeability)? Specifically, anything which avoids the use of the Shift key or multi key combos. Maybe what I really want is a programmer's keyboard which allows underscores, parens and major operators to be available without an awkward vulcan nerve pinch.
Why not - machines are cheap. Especially cheap machines (intel).
I can sell an optimized program for an existing machine for $40, or I can sell a faster computer plus a less-optimized program for $400. What is the customer more likely to buy?
Will I retire or break 10K?
And here's the evidence to back it up.
Stick Men
In my not so humble opinion, we should go back to basics. Or, at least, teach them:
- Assembler, with cycle counting and all that gnarly stuff.
- C, with emphasis on pointers and structures.
If you don't agree with me, then go stuff yourself sideways up the wazoo of a 3GHz P4 and stop running any OS - because that is what it is written in.
Some of the people at my school (Queen's) came up with a language many years ago called Turing. It was designed to be an educational replacement for Pascal and so had a straight-forward syntax, etc. So that it would be suitable for both lower- and higher-level courses it supposedly is designed so that language features can be added as modules.
I haven't really looked into it (just told about it by one of the designers of Turing), but this seems like a really good way to satisfy people like you, especially since some of those features are mutually exclusive as other posters have suggested.
I've heard things about Lua being modular -- anyone know more?
Many pattern critics point out that some of the Gang of Four Design Patterns are ways of adding features from some languages to Java (or other OO languages that are lacking?). There is even a paper out there (don't ask me, ask Google) that goes through the list and finds that a significant percentage are trivial in functional languages. So I propose a language design principle: create a language that makes as many popular patterns trivial/obsolete as possible.
If its a common enough occurence to be worth including in a book on patterns, then it's common enough to design for. Programmers learning the language will feel joy because rather than figuring out how to translate their memorised patterns into the new language, they will be able to forget them completely. And since you can't just stick a solve_pattern_foo keyword in the language, I believe that designing the language to solve these problems will have a side-effect of making it very powerful and expressive.
Go back and read the Bruce Eckel article I posted a link to in my original reply.
Sigh. I did. Here are his substantive arguments, in order:
Ans: irrelevant, OCaml has duck typing, but is strongly typed. C++ also has duck typing for template instantiations. The last quote is utter bullshit, since both O'Caml and C++ handle that with aplomb.
Ans: Type inferen, see previous posts
Ans: clearly irrelevant to the typing debate
Ans: good, cuase I ain't claimin' that.
Ans: Why not BOTH?
Ans: He forgot the if: IF python is faster to code in. I can grant that writing python is faster than writing in staticly typed languages without type inference or great libraries, BUT I'M NOT.
Essentially he argues that static typing is not such a great test. I argue that it's one less thing I have to write unit tests for. His answer is that writing all those types takes programmer time, and my answer is inference.
He never says static typing is bad, he says non-duck typing is bad, and static typing isnt worth the tradeoff of more programmer keyboard time. My answer is to include duck typing and avoid the keyboard time with inference.
I'm so fucking SICK of that monstrosity C! It is not the pinaccle of programming syntax. Let's make the syntax like Pascal or anything else besides C!!
Debunking the "59 Deceits"