Sign in to follow this  

Problem specific languages

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

How much is it recommended to use programes built for a specific use? For example, I'm thinking about writing an AI program. Now, in C++ I feel like I can implement any algorithm that I can clearly define without to much trouble (except maybe the design). So why would it be better to do it in something like prolog which I feel less comfortable in? Or maybe I'm really asking - what motivates me to learn another language really well when I'm already comfortable with the one I'm using? I know that for some things it's just a syntax issue - like using C# for .net and not C++. But how useful is it in things like ai which are algorithms like any other? Thanks.

Share this post


Link to post
Share on other sites
Programming languages are just tools so use the one that you feel suits best for the task you're currently doing. What should motivate you to have a look at other languages is what they can offer in comparison to what you currently use, have a good look a couple of them and see what they offer, you don't necessarily need to learn all about them. The least you've gained is some knowledge that may trigger you to switch/embed/extend/whatever in a future project.
That's my 2 c's anyway.

Share this post


Link to post
Share on other sites
Depends no what you're after. If you're coding for yourself, then it doesn't matter what you use.

But if you're solving a problem, then you will want to choose best tools for the job.

You can build a house using duct tape. Using enough duct-tape, you could even build a strong house. But you'd be better off using proper tools.

When you say you're using C++, you're just using one of solutions, not a better or more general one. There are areas where domain-specific languages don't do well. C# will surpass prolog when it comes to GUI. Java will surpass C++ when it comes to portability.

But most importantly, you're mixing in types of languages. C++, C, Java and C# are identical. Prolog however, falls under completely different programming paradigm. So does LISP.

This is where the distinction between procedural and functional languages arises (at highest possible level). Each of those is focused at different way of looking a problems.

The advantage? Knowing as many different concepts helps you choose. Prolog, despite dealing with logic, isn't ideal for many AI-related problems. When it comes to games, prolog would likely be very low on the list, since games need imperfect, often flawed logic.

The most deciding factor will always be: what can you use. Can you integrate prolog interpreter into your application? What's the cost of doing so? How will it interact? What's the cost of that? Do you have people on your team who know prolog? What's the cost of training them? (Cost here doesn't mean only money, but overall effort to accomplish something).

Knowledge brings fear.. ahem... You can never have too much knowledge. So a better question is: Why wouldn't you learn another, in many ways exotic, language.

Share this post


Link to post
Share on other sites
There's really no clear answer to your question...for example, Naughty Dog Software (now owned by Sony Corp) produced the Jax and Dexter series of games for several consoles with Lisp (supported by C++), I understand. Many games are done purely in C++. You could use other combinations as well. Consider interpreted vs non-interpreted languages and the time involved to produce what you want.

--random

Share this post


Link to post
Share on other sites

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