views:

299

answers:

9

I am working on a new language, targeted for web development, embeding into applications, distributed applications, high-reliability software (but this is for distant future).

Also, it's target to reduce development expenses in long term - more time to write safer code and less support later. And finally, it enforces many things that real teams have to enforce - like one crossplatform IDE, one codestyle, one web framework.

In short, the key syntax/language features are:

  1. Open source, non-restrictive licensing. Surely crossplatform.

  2. Tastes like C++ but simpler, Pythonic syntax with strict & static type checking. Easier to learn, no multiple inheritance and other things which nobody know anyway :-)

  3. LLVM bytecode/compilation backend gives near-C speed.

  4. Is has both garbage collection & explicit object destruction.

  5. Real OS threads, native support of multicore computers. Multithreading is part of language, not a library.

  6. Types have the same width on any platform. int(32), long(64) e.t.c

  7. Built in post and preconditions, asserts, tiny unit tests. You write a method - you can write all these things in 1 place, so you have related things in one place. If you worry that your class sourcecode will be bloated with this - it's IDEs work to hide what you don't need now.

  8. Java-like exception handling (i.e. you have to handle all exceptions)

I guess I'll leave web & cluster features for now...

What you think? Are there any existing similar languages which I missed?

+1  A: 

The language tastes good in my opinion, I don't want use java for a simple website but I would like to have types and things like that. ASP .NET is a problem because of licensing and I can't afford those licenses for a single website... Also features looks good

Remember a lot of operator overloading: I think is the biggest thing that PHP is actually missing. It allows classes to behave much more like basic types :)

When you have something to test I'll love to help you with it! Thanks

Fire-Dragon-DoL
+1  A: 

Well, if you have to reinvent the wheel, you can go for it :)

I am not going to give you any examples of languages or language features, but I will give you one advice instead:

Supporting framework is what is the most important thing. People will tend to love it or hate it, depending on how easy is to write good code that get job done. Therefore, please do usability test before releasing it. I mean ask several people how they will do certain task and create API accordingly. Then test beta API on other coders and listen carefully to their comments.

Regards and good luck :)

Paweł Dyda
+4  A: 

No.

Every buzzword you have included in your feature list is an enormous amount of work to be spec'd, implemented, documented, and tested.

How many people will be actively developing the language? I guess the web is full of failed programming language projects. (Same is true for non-mainstream OSes)

Have a look at what .Net/Visual Studio or Java/Eclipse have accomplished. That's 1000s of years of specification, development, tests, documentation, feedback, bug fixes, service packs.

During my last job I heard about somebody who wrote his own programming framework, because it was "better". The resulting program code (both in the framework and in the applications) is certainly unmaintainable once the original programmer quits, or is "hit by a bus", as the saying goes.

As the list sounds like Java++ or Mono++, you'd probably be more successful in engaging in an existing project, even if it won't have your name tag on it.

devio
BarsMonster
Also, If It would be just a set of buzzwords, I would place Lambdas and Closures on #1 and #2, but they are not here at all :-)
BarsMonster
+3  A: 

Perhaps you missed one key term. Performance.

In any case, unless this new language has some really out-of-this-world features(ex: 100% increase in performance over other web development languages), I think it will be yet another fish in the pond.

Trust me on this one. Cuz' currently I'm responsible for maintaining a framework developed/owned by my company. It's a nightmare. Unless there is a mainstream community, working on this full time, it's really an elephant. I curse my company's decision to develop its own framework(cuz it's supposed to be "faster") day 'n night.

pavanlimo
Well, there is that term :-) It's as fast as compiled C, while having same nice Pythonic syntax and many of it's features.
BarsMonster
A web development language, being as fast as compiled C should be a miracle at minimum!.
pavanlimo
+9  A: 

To summarize: You language has no real selling points. It just does what a dozen other languages already did, with syntax and semantics just slightly off, depending on where the programmer comes from. This may be a good thing, as it makes the language easier to adapt, but you also have to convince people to trouble to switch. All this stuff has to be built and debugged and documented again, tools have to be programmed, people have to learn it and convince their pointy-haired bosses to use it, etc. "So it's language X with a few features from Y and nicer syntax? But it won't make my application's code 15% shorter and cleaner, it won't free me from boilerplate X, etc - and it won't work with my IDE." The last one is important. Tools matter. If there are no good tools for a language, few people will shy away, rightfully so.

And finally, it enforces many things that real teams have to enforce - like one crossplatform IDE, one codestyle, one web framework.

Sounds like a downside! How does the language "enforce one X"? How do you convince programmers this coding style is the one true style? Why shouldn't somebody go and replace the dog slow, hardly maintained, severly limited IDE you "enforce" with something better? How could one web framework possibly fit all applications? Programmers rarely like to be forced into X, and they are sometimes right.

Also, you language will have to talk to others. So you have ready-made standard solutions for multithreading and web development in mind? Maybe you should start with a FFI instead. Python can use extensions written in C or C++, use dynamic libraries through ctypes, and with Cython it's amazingly simple to wrap any given C library with a Python interface. Do you have any idea how many important libraries are written in C? Unless your language can use these, people can hardly get (real-world) stuff done with it. Just think of GUI. Most mayor GUI toolkits are C or C++. And Java has hundreds of libraries (the other JVM languages profit much from Java interop) for many many purposes.

Finally, on performance: LLVM can give you native code generation, which is a huge plus (performance-wise, but also because the result is standalone), but the LLVM optimizers are limited, too. Don't expect it to beat C. Especially not hand-tuned C compiled via icc on Intel CPUs ;)

delnan
`You language has no real selling points. It just does what a dozen other languages already did, with syntax and semantics just slightly off, depending on where the programmer comes from.` That never hurt C#.
Beau Martínez
@Beau: But the OP won't make one of the world's biggest corporations push his language ;)
delnan
@Beau: C# started off with a killer function: writing .NET programs, particularly for people who'd be embarrassed to be writing VB.NET. Java started off with a killer function: writing applets, since it was write once, run anywhere. The fact that almost nobody does that anymore and it never did work as advertized doesn't mean it wasn't important in getting Java started.
David Thornley
BarsMonster
There definitely will be a possibility to integrate with 3rd party binary libraries, it's not a big deal, as the language is kinda C friendly. Clang(LLVM based) already competes with GCC, I don't see why I can't do the same. Well, being 20% slower is not a big deal at the beginning while Python/PHP/many other langs are dozens and hundreds of times slower.
BarsMonster
+6  A: 

"Are there any existing similar languages which I missed?"

D? Compared to your features:

  1. The compiler has a dual license - GPL and Artistic
  2. See example code here.
  3. LDC targets LLVM. Support for D version 2 is under development.
  4. Built-in garbage collection or explicit memory management.
  5. core.thread
  6. Types
  7. Unit tests / Pre and Post Contracts
  8. try/catch/finally exception handling plus scope guarantees
Corbin March
Yeah, at first I didn't notice that he's talking about making his own language, and I thought he was trying to gauge the appeal of D w/o mentioning it by name.
dsimcha
+1  A: 

There's always space for another programming language. Apart from getting the design right, I think the biggest problem is coming across as just another wannabe language. So you may want to look at your marketing, you need a big sponsor who can integrate your language into their products, or you need to generate a buzz around it, easiest way is astroturfing. Good luck.

http://en.wikipedia.org/wiki/List_of_programming_languages

NB the names G and G++ aren't taken. Oh and watch out for the patent trolls.

Edit

Oops G / G++ are taken... still there are plenty more letters left.

Jaydee
g++ is the Gnu C++ compiler. While it may not technically be taken, using it for anything else will cause a great deal of confusion.
David Thornley
+4  A: 

What you've given us is a list of features, with no coherent philosophy, or explanation as to how they will work together. None of the features are unique. At best, you're offering incremental improvements over what's already there. I'd expect there's already languages kicking around with what you've said, it's just that they're still fairly obscure, because they didn't make it.

Languages have inertia. People have to learn new languages, and sometimes new tools. They need incentive to do so, and 20% improvement in a few features doesn't cut it.

What you need, at a minimum, is a killer app and a form of elevator pitch. (The "elevator pitch" is what you tell the higher-ups about your project when you're in the elevator with them, in current US business parlance.) You need to have your language be obviously worth learning for some purpose, and you need to be able to tell people why it's worth learning before they think "just another language by somebody who wanted to write a language" and go away.

You need to form a language community. That community needs to have some localization at first: people who work in X big company, people who want to do Y, whatever. Decide on what that community is likely to be, and come up with one big reason to switch and some reasons to believe that your language can deliver what it promises.

David Thornley
My thoughts exactly, +1
delnan
Very true. All this most of the times require planning. But sometimes, things just happen and fall in place.
pavanlimo
BarsMonster
@BarsMonster: In which case you need to explain the philosophy, as part of the description. On the other hand, in another comment you say you're not trying to conquer the enterprise market, which seems odd for a language designed to be attractive to project managers.
David Thornley
@David Thornley: There are stuff for large Enterprise applications with heavy DBs and ultraheavy frameworks (like Java+EJB). I am not going there. Target is small and mid. business.
BarsMonster
+3  A: 

Responding to a few of your points individually (I've omitted what I consider either unimportant or good):

targeted for web development

Most people use php. Not because it's the best language available, that's for sure.

embeding into applications

Lua.

distributed applications, high-reliability software (but this is for distant future).

Have you carefully studied Erlang, both its design and its reference implementation?

it enforces many things that real teams have to enforce - like one crossplatform IDE, one codestyle, one web framework.

If your language becomes successful, people will make other IDEs, other code styles, other web frameworks.

Multithreading is part of language, not a library.

Really good languages for multithreading forbid side effects inside threads. Yes, in practice that pretty much means Erlang only.

Types have the same width on any platform. int(32), long(64) e.t.c

Sigh... There's only one reasonable width for integers outside of machine-level languages like C: infinite.


Designing your own language will undoubtedly teach you someting. But designing a good language is like designing a good cryptosystem: lots of amateurs try, but it takes an expert to do it well.

I suggest you read some of Norman Ramsey's answers here on programming language design, starting with this thread.

Given your interest in distributed applications, knowing Erlang is a must. As for sequential programming, the minimum is one imperative language and one functional language (ideally both Lisp/Scheme and Haskell, but F# is a good start). I also recommend knowing at least one high-level language that doesn't have objects, just so you understand that not having objects can often make the programmer's life easier (because objects are complex).

As for what could drive other people to learn your language... Good tools/libraries/frameworks can't hurt (FORTRAN, php), and a big company setting the example can't hurt (Java, C#). Good design doesn't seem to be much of a factor (a ha-ha-only-serious joke has it that what makes a language successful is using {braces} to delimit blocks: C, C++, Java, C#, php)...

Gilles