Sign in to follow this  

Language Theories

This topic is 4183 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering if anyone knew of any interesting articles about unique approaches to programming langauges (as in new/fictional ones, not C++ and the like). I've ran across a few in the past, but that was years ago. And to be more specific, I am talking about the design of the language. Thanks in advanced!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
I was wondering if anyone knew of any interesting articles about unique approaches to programming langauges (as in new/fictional ones, not C++ and the like).


There are many approaches to programming that are VERY unlike C++ and the like, yet are neither new nor fictional.

See, for example, functional programming. Check out Haskell and Scheme and ML.

Or logic programming. Check out Prolog.

For newer stuff check out term rewriting systems such as Maude.

For cool stuff in general about languages and their design, check out:

http://lambda-the-ultimate.org/

Share this post


Link to post
Share on other sites
Yeah I guess specifics help.. I'm looking into high-readability languages that are flexable (like python), that are also highly object oriented.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I can't say I know much about these, as I believe OO is generally overhyped. A lot of python's strengths are due to other features, I believe.

Smalltalk should be mentioned as the canonical completely OO language, but I guess you already know about it.

You might look into Common Lisps' object system, CLOS. Instead of restricting methods to being owned by classes, it has generic methods that are dispatched on multiple argument types. It's a different (more flexible in my opinion) approach to OO.

Then again, I don't think you'd call Lisp high-readability, so i'm sorry I couldn't be more helpful.

Share this post


Link to post
Share on other sites
I don't know of a discussion of design, but I'm a big fan of LabVIEW which is a pretty big switch from C++.

Another thing I find interesting is some of what's happening with Squeak. The Etoys in particular.

Whether you consider these OO is probably a matter of definitions. No two people seem to have the same definition for OOP. When you say you want OO, what are you looking for?

Share this post


Link to post
Share on other sites
I've been playing with Ruby lately and it is surprising what you can do with it. I don't see it replacing C++ for making games with, but it is a nice change to work with.

~Shiny.

Share this post


Link to post
Share on other sites
Indeed, take a look at Haskell! You need to be determined to learn it, most people coming from a background of imperative languages hate it for a couple of weeks before they "get it" - and then they love it.

Another cool thing you should look at is Jekyll.
http://jekyllc.sourceforge.net/index.html

It's a new high level Haskell like language, BUT it can be translated to C and back so your legacy code (and legacy programmers) can use C, while new code (and smart programmers) can use a modern language.
It's alpha right now, but it seems like a good compromise. I'd rather everyone just stopped using C and switch to something better (i.e. *anything*), but that may not happen anytime soon so something like Jekyll could be a good enough compromise.

Share this post


Link to post
Share on other sites
Well a friend and I have been working on a modular game system (actuially been going on for about 3 years now), and I am planning on either writing my own scripting language, or writing a parcer for an existing one ( I've written a BASIC and ASM parcer so at least the concepts aren't foreign). I like the way BYOND's language kindof melds with the system, but I want something a little less pythony. Even though it'l be parsed I'll still need the ability to debug/step through code (Which is why I figured i'd just write my own parcer). Thank you for your ideas, and I'll look over them and see what I can pick up!

Share this post


Link to post
Share on other sites
Hrm does Haskell provide an API for using the interpreter inside another C++ application? If not that is fine, I do like the way that language looks.. its.. different.

Share this post


Link to post
Share on other sites
Haskell is a multiple implementations language. Most are native code compilers, so they aren't suitable for embedding. Hugs is a bytecode compiler/interpreter written in C. I don't know how easy or hard it is to embed into another application, the website lists no embedding API.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Dreq
Hrm does Haskell provide an API for using the interpreter inside another C++ application? If not that is fine, I do like the way that language looks.. its.. different.


Haskell is a language specification, not a particular implementation. AFAIK all the current implementations are compilers, but there might be embeddable interpreters out there. If there is one, it's probably listed at haskell.org I've never heard of one, but I'm more of a ML user myself, and don't know Haskell all that much.

Hope this helps.

Share this post


Link to post
Share on other sites
Well so long as it gives me enough detail to be able to properly impliment it, I can write my own api (in this situation I might as well make it its own .lib and contribute back to the community or whatnot since everything else is modular also).

Share this post


Link to post
Share on other sites
There are far too many to mention, but I'll list a few interesting ones. I suggest you don't focus too much on heavily OOP languages.

Haskell, as already mentioned is an important functional language. SML and OCaml aren't as much of a radical departure from C++, but they are easier to pick up and might be a good stepping stone. Just try to learn functional methods of programming, and don't try to use a C++ style in them. OCaml itself is a very nice, practical language which is good for doing the things you'd usually use C++ for.

Oz is a very impressive language with support for many programming paradigms, such as functional, imperative, concurrent, OOP, logic and constraint programming. I highly recommend the book Concepts Techniques and Models of Programming Languages if you can afford it - it uses Oz and teaches all these styles of programming. You'll learn a lot from it.


Other languages that are interesting in some regards:

Erlang is a concurrent functional language now with hardware threads that shows how much easier multithreaded programming can be compared to C++.

E is a functional/OOP language which introduces capability-based security.

Slate is a new Smalltalk-like language with a prototype-based object system and other interesting things. Interesting if you have only ever used class-based OOP.

Epigram is a pure functional language with a dependent type system (not for the faint of heart).

Share this post


Link to post
Share on other sites
Quote:
Original post by bytecoder
Try taking a look around lambda-the-ultimate.

Quote:

Epigram is a pure functional language with a dependent type system (not for the faint of heart).

You forgot to mention the funky, "2D" syntax.
Yeah, the current editor isn't too helpful with it either. Promising though.

Hows Boa coming along? I'm going to start an interpretter for my language soon.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rebooted
Quote:
Original post by bytecoder
Try taking a look around lambda-the-ultimate.

Quote:

Epigram is a pure functional language with a dependent type system (not for the faint of heart).

You forgot to mention the funky, "2D" syntax.
Yeah, the current editor isn't too helpful with it either. Promising though.

Does the editor let you write LaTeX or do you have to do that manually?

Quote:

Hows Boa coming along? I'm going to start an interpretter for my language soon.

Good, I've almost got the type system done. After that I've only got a few relatively simple things left to implement. What language are you going to write your interpreter in?

Share this post


Link to post
Share on other sites
Quote:
Original post by bytecoder
Does the editor let you write LaTeX or do you have to do that manually?
Well, instead of typing the forall symbol, you type all. The 2D brackets take this form:

( !
! )

Quote:

Good, I've almost got the type system done. After that I've only got a few relatively simple things left to implement. What language are you going to write your interpreter in?
I'm going to test out my ideas by writing a dialect of lisp for simplicities sake, and so I don't have to worry about syntax. This will get implemented in Scheme. From there, I'll work out my syntax and write an interpreter for the real language in OCaml. I think I'll be using the lisp version for a while though - there are a lot of things I want to test out, although the type system has been my main focus so far.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dreq
Hrm does Haskell provide an API for using the interpreter inside another C++ application? If not that is fine, I do like the way that language looks.. its.. different.


There is a foreign function interface so you can export Haskell functions for use with any language that can interface through C.

Most people tend to call C from Haskell, though (i.e. write as much as possible in Haskell) so that route is more explored in tutorials and the like (there are even quite a few tools to generate the FFI stubs automatically given header files for C/C++).

Share this post


Link to post
Share on other sites

This topic is 4183 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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