Sign in to follow this  
C-Junkie

What language features can't you live without?

Recommended Posts

C-Junkie    1099
In thinking about thinking about maybe doing a possible research project with languages, I've been trying to think of what, exactly, I'd be doing this research project on. Or more specificly, what specific things I'd like to find ways to fit together within a theoretical language. (getting rid of the "theoretical" part is a later worry.) So, I'd like to hear ideas about what people really really like with their favorite languages and what people really really hate about their umm... favorite languages. It can be pretty much anything. From little syntax quirks (for_each is an abomination in C++!) to syntax rules (Python's tabbed indented makes all code really easy to read and consistent!) to barely even related to the language (Perl's CPAN module system kicks ass!) And don't let my examples bias you. :) I'd rather hear things I don't expect to hear, so if you think C++'s for_each is pretty... Speak Up!

Share this post


Link to post
Share on other sites
antareus    576
Flexible metaprogramming
Object properties
Function overloading
Operator overloading
Minimal runtime requirements (DLLs/size/etc)
RAD
Excellent tool support (debuggers/profilers)

Share this post


Link to post
Share on other sites
Ra    1062
Perl's regular expressions rule. In fact, everything about Perl rules. [grin]

The only thing I really dislike about the language is how some CPAN modules just don't work, or some require _tons_ of other modules.

Share this post


Link to post
Share on other sites
chollida1    532
A fully functional runtime environment like Java's runtime, Perl CPAN packages or .Net's CLR.

Infact, I find that .Net's CLR has alot of methods that I used to write over and over.

long live high level languages:)

Cheers
Chris

Share this post


Link to post
Share on other sites
Dmytry    1151
comments , obviously. Nobody can live without comments.

well, to balance things, what i hate about C++
1: Autoconversion of built-in types.(and all that problems that come from it, including if(a=b) )
2: float-->int via truncation, no standard way to convert float to integer with rounding, or like "ceil", or like "floor".
3: lack of modules
4: .h[ack]-files and as result, compilation is slower than it should be (don't tell me about precompiled headers - compating to REAL modules, it's just practical joke. It can never get to same performance because one header affect other headers)
5: i hate sintax of template parameter. < > it's "less than" and "greater than". It's not a good idea to use it for brackets.

Good things: Templates, template libs, OOP, etc.

Share this post


Link to post
Share on other sites
daerid    354
Quote:
Original post by Polymorphic OOP
C++ templating and the many great wonders that come from it


With probably a bit more intelligent compiling and syntax.

Anyways, my wishlist is pretty much just Python that compiles to native code with little to no runtime dependencies.

Share this post


Link to post
Share on other sites
Extrarius    1412
Real MetaProgramming (Lisp)
Object Orientation (C, C++, Lisp)
Eval/FunCall/Apply (Lisp, PHP)
Pointers & References & Values (C++)

Share this post


Link to post
Share on other sites
Wyrframe    2426
Object Orientation (OCaml, Java)
Properly-implemented polymorphism (OCaml, Java)
Higher-order functions (OCaml, Scheme)
Powerful and well-documented standard library (OCaml, Java)

Guess what language I use and love?

Looking back, I can't believe I ever got anything done with C++, although I still use C from time to time...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Quote:
Original post by antareus
RAD
What kind of language feature is that?

Share this post


Link to post
Share on other sites
fractoid    703
djnz. mov. outp. Everything else I can live without. :)

Otherwise... umm... nah, pretty much anything will do. Maybe a compiler/interpreter that gives line numbers with the errors? The calculator I learned to program on gave me the illuminating message "Syntax error" when it failed to understand a (often multiple KB of source code) program. That sucked. :/

Share this post


Link to post
Share on other sites
iMalc    2466
Take a look at the language D, it has many great features.
I can barely fault it. I'd like to see it really take off actually.

Share this post


Link to post
Share on other sites
daerid    354
Quote:
Original post by Wyrframe
Object Orientation (OCaml, Java)
Properly-implemented polymorphism (OCaml, Java)
Higher-order functions (OCaml, Scheme)
Powerful and well-documented standard library (OCaml, Java)

Guess what language I use and love?

Looking back, I can't believe I ever got anything done with C++, although I still use C from time to time...


I personally love OCaml, but the documentation isn't very intuitive.

However, I use C/C++ mainly because of it's ease of interfacing with the Windows API. When I need more flexibility, it's Python and it's Win32 extensions

Share this post


Link to post
Share on other sites
ToohrVyk    1596
Necessary:

If, for, while control statements
Functions
Splitting projects into multiple files

Useful:

Polymorphism (Any kind)
Nested function declaration (OCaml, and IIRC C#)
Garbage collection (Java, C#, OCaml)
Strong typing (OCaml) with maybe Type inference (OCaml)
Decent Graphics, Input, Sound and Network libraries (NOT OCaml)

Nice:

Multi-Dispatch Polymorphism (Lisp IIRC)
Good exception handling (C# and OCaml)
Namespaces or similar (C++, C#, OCaml)
Tail recursion detection (OCaml, although others might to it)
Very few rules, a lot of undetermined behavior (OCaml), prevents "elite" programs that use obscure rules to solve a problem.
Object Oriented (C#, and C++/OCaml might qualify)
OCaml Modules!

As far as languages go:
- C is slow to develop in, does not have many nice features. (EDIT: before anyone kicks my ass about that, I mean for very large projects).
- OCaml is fun to work with, but lacks the libraries to do anything interesting.
- C++ is a powerful language that allows to get work done if you have the willpower to stay away from all the nasty habits it also promotes.
- C# is excellent as far as languages go, with great support, great debugging, great libraries and a lot of good ideas. Although some might say it lacks the elegance of OCaml ;)
- Java... bleh, while it has its uses, I personnally don't like it.

[Edited by - ToohrVyk on November 10, 2004 2:19:50 AM]

Share this post


Link to post
Share on other sites
ajas95    767
Quote:
Original post by iMalc
Take a look at the language D, it has many great features.
I can barely fault it. I'd like to see it really take off actually.


Yeah, it seemed like it had many +'s when I read about it. But then I read that they had no intention of making it C++ linkable! Why do people go through so much work, and then blow it on this issue? And their reasoning was basically "C++ is too messed up. It would be really complicated. We give up."

What I really want is a suite of languages that can all interoperate, so that if I need to do hack-scripting, I can do that. If real OO, then use that language. Templates, or Assembly... all those things, and each in a module where it makes sense. I understand the .Net framework is an attempt toward this. Many people like C#, yet for all my bitching I've never tried it! :)

Share this post


Link to post
Share on other sites
antareus    576
Because there is no standard C++ linkage. Really, linking with C++ is not as big a deal as you make it out to be. If things need to interoperate, then they can simply provide a straight C interface like the whole world has been doing for a long time.

Share this post


Link to post
Share on other sites
capn_midnight    1707
glCreateMMORPG(GL_MMORPG_REALLY_COOL);

really gotten me out of some jams.

but seriously, it would have to be inheritance and the java class library. So many times my professors give me stupid projects, and all I really need to do is to create a subclass of some java standard class.

And since I'm talking about java, it would not be useable without Eclipse. Java is just too verbose, and the packages too obscure to do java on the command line. Eclipse makes java a useable langauge, and almost bareable.

Share this post


Link to post
Share on other sites
Kassandra    146
Likes:
- I like that Java makes it easy to write good and elegant code
- I like Java's many useful libraries and packages
- I like interfaces, being able to use interfaces
- I just love Eclipse as an IDE
- I like C++ operator overloading which can be very useful
- I like the Idea of C++'s templates, though they are somehwat tricky to handle and write well
- I like PEAR for PHP, many useful libraries (like some template engines and HTMLFormGenerator and such)
- I like garbage collection

Dislikes:
- I dislike some of C++'s syntax (like virtual void foo() = 0;)
- I dislike how easy it is to accidently hang yourself with C++
- I have yet to find a language (or library) that makes creating a GUI not so painful (I hate Java in that respect and I've tried the Win32 API for C++ but have yet to try out SDL which I heard is better. PHP has some nice libraries within PEAR that go in the right direction for me)
- I hate Java's reflection mechanism, it's a pain
- I HATE Struts for Java and JSP's
- I HATE Castor JDO but like abstraction layers to the database (just not Castor)
- I hate using object-oriented or partially object oriented database functions (had to use it with Oracle once)
- I dislike triggers and stored procedures in databases, I like to have my business logic in my actual software and not hidden in the database somewhere

Oh, and I dislike SmallTalk. It may be object-oriented but its syntax is just horribly weird.

Share this post


Link to post
Share on other sites
eighty    220
One-liner comments and nested multiline comments
Namespaces and a mechanism that allows you to rename them
Operator overloading
Automatic type conversion for primitives (maybe not to/from booleans)
Higher-order functions and lambda functions
OOP

Share this post


Link to post
Share on other sites
mattnewport    1038
Quote:
Original post by ToohrVyk
Necessary:

If, for, while control statements
Functions
Splitting projects into multiple files

If, for and while aren't strictly necessary. Functional languages often go without some or all of them. ML has no looping constructs and the if statement is just shorthand for a more verbose conditional expression, the language would work without an if.

Being able to organise projects in a modular fashion is certainly an important feature but I think it would be interesting to see a language that didn't equate modules with files so directly. With modern IDEs there's no fundamental reason why source files should be the basic unit of code organisation. Some kind of active database of code might make for a much better system and I've heard of a number of projects investigating that. Microsoft's Intentional Programming research project included this idea. There are many benefits to a system that stores code as a parsed Abstract Syntax Tree rather than just as flat text in files.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this