Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

tuxx

Next generation programming style?

This topic is 5892 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

In the beginning, there was unstructured code, and God didn''t see that it was good. Then, there was procedural programming, and God saw it was good. But then, there was Object Oriented Programming, and God saw that it was good... So, what do you guys think may be next? I don''t know what to call it besides programming style, but that doesn''t sound to descriptive. Do you guys know of anything that could be the next-gen thing? Or some theories? ... And then, there was ______, and God saw that it was damn good! -------------------------- Lucid code is an oxymoron! --------------------------

Share this post


Link to post
Share on other sites
Advertisement
Some of researchers in programming language theory back at my university strongly believe that the next "big thing" in language paradigms is so-called functional programming. This is available today through languages such as ML and Miranda og object oriented varients such as Objective CaML. Nice languages, but by todays standards they are still quite slow but they are certainly getting faster.

Another of my former teachers still thought that declarative programming would win in the end (language such as Prolog) - but in my opinion he is a jerk - Prolog is long past dead. The last class I attended with him we actually files an official complaint because we thought he was incompentent (not because he liked Prolog though)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
template meta programming. Imagine the power of functional programming but with none of the inherent suckiness.

Share this post


Link to post
Share on other sites
>> it''s just only really applicable to a small niche.

what I meant was that it was dead in the sense that nobody (well, almost nobody ) thinks it will be the next big thing. Many people thought that many years ago - but the hype has gone of it as it turned out only to have a niche use. And even to logic and AI I find it limited - I have written several projects in it and really dislike it - it claims to be so general but because it orders instructions (which logic should not) for the sake of speed, the language doesn''t work as well as it promises.

Share this post


Link to post
Share on other sites
I put it to you that you can write OOP code with a procedural compiler. It''s harder to be sure but it can be done. It''s more of a conceptual thing then a language. We write tools to add the concept. So what is a Useful concept thats hard to implement..

Self modifying code? -AI''s would rock.
Code that reads more like a book? - don''t know what the benifits would be.
Runtime defining of objects? - I know I''ve wantd this a couple of times.
Imadginary language? - as in imadginary numbers. {i = sqrt(-1)}

What would we like?


It is a good day to code.

Share this post


Link to post
Share on other sites
Template meta-programming - the power of functional programming with the efficiency (and familiarity) of imperative programming.

See sig for template libraries - Loki is the most revolutionary and ''cutting edge''. The other libraries actually work on compilers that exist today. Loki currently compiles (and fails to compile) correctly on gcc & Comdaeu.

quote:
glJunkie
What is functional programming from someone who knows a little about OO programming?


Object Oriented programming is a subset of imperative programming (of which procedural & modular are also part of). It''s defining characteristic is that one statement follows another, and state information is retained from one statement to the next.
e.g. i = i + 1
The defining characteristic of functional programming is recursion - particularly recursive definitions - a trivial example is a factorial function. The key concept that is different, is that the function isn''t ''bound'' until you give it parameters - so the function can very well do completely different things given different parameters. It''s like textual substitution, except it''s smarter.

Functional languages such as ML or Lisp are interpreted and pure (that is they only do functional style constructs). Then there''s languages like Smalltalk (and Haskell?), that have a few functional constructs among many imperative ones - but are also interpreted.

Then there''s C++, that has the gauntlet of imperative constructs, and fledging functional ones - and compilers are available for native & JIT compilation. In effect, the template code is converted to machine (or byte) code during the compilation phase, instead of during run-time.

There’s talk of adding so-called generics to both Java and the .Net MSIL.


Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ]

[Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:

What is functional programming from someone who knows a little about OO programming?



You can built objects on top of functions and functions on top of objects.

quote:

Then there''s languages like Smalltalk (and Haskell?), that have a few functional constructs among many imperative ones - but are also interpreted.



Any language for which there exists an interpreter can also be compiled. Suppose there exists instruction X that is implemented in an interpreter by a finite sequence of machine instructions, {S}. X can therefore be compiled to {S}. There exists compilers for Smalltalk, Haskell, Scheme, etc.

quote:

Template meta-programming - the power of functional programming with the efficiency (and familiarity) of imperative programming.



I agree that any language to implement this would be most useful. The template functionality in C++ is just a way to infer a type from how the objects are used. Taking OO to the extreme and having general Object-classes as in Java is useful as well, but it leads to a lot of casting (Correct me if I''m wrong, but one argument for the OO mechanisms in C++ were to prevent overuse of casting like that found in C with unions). Type inference is something that functional languages have been doing for quite awhile. Throw in anonymous-classes or make functions first-class and I''d code in it in a heart beat.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I forgot to finish my response to the first quote. I meant to say that someone familiar with OO programming will find little earth shattering if they switch to functional programming. The solution lies somewhere in the middle.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!