Welcome to Gaia! ::

RiotFinger
Disconsented
Boo, Javascript or C#

I am intending to start a pet project within unity3D and for a scripting language the above are used.
What would be the most useful within the project and potentially in later life.

Javascript = Web browser scripting code.
C# = Windows binary programming language.

To code for a website, or to make an executable application?
Major differences.
Did you miss the part about Unity3D? In this case, they're scripting tools for the engine, not unlike Lua for World of Warcraft.
RiotFinger's avatar
  • 300
  • 50
  • 50
psychic stalker
RiotFinger
Disconsented
Boo, Javascript or C#

I am intending to start a pet project within unity3D and for a scripting language the above are used.
What would be the most useful within the project and potentially in later life.

Javascript = Web browser scripting code.
C# = Windows binary programming language.

To code for a website, or to make an executable application?
Major differences.
Did you miss the part about Unity3D? In this case, they're scripting tools for the engine, not unlike Lua for World of Warcraft.

I'm sorry, I thought you were questioning which one you'd use later on in life. When it comes to the project, according to what you are saying, they both get the job done. So the only difference should be which one you'd use -after- your project. But, who knows, maybe you know of another difference~ :3
I really should have looked at this more often.
I have chosen to go with C# because there is lots of external information that is readily accessible to me and there is a large demand (in my country) for people with C# experience.
Disconsented
I really should have looked at this more often.
I have chosen to go with C# because there is lots of external information that is readily accessible to me and there is a large demand (in my country) for people with C# experience.
Don't write off learning other languages, though. I've seen a lot of C# programmers who end up being very good at writing C#, but very bad at reasoning about their code. Learning other languages will help you avoid being That Guy.
psychic stalker
Disconsented
I really should have looked at this more often.
I have chosen to go with C# because there is lots of external information that is readily accessible to me and there is a large demand (in my country) for people with C# experience.
Don't write off learning other languages, though. I've seen a lot of C# programmers who end up being very good at writing C#, but very bad at reasoning about their code. Learning other languages will help you avoid being That Guy.

I intend to learn more but I am learn Python in class and C# in my spare time, that coupled with uni - work - paintball... Etc doesn't leave me with much time to do anything else.

I plan to learn Java latter down the track 'just cause'.
psychic stalker
Writing AES in JavaScript does not make sense. Likewise, writing it in C#, C++, or Java does not make sense. It makes sense to write it in C, and to plug it into the language runtime you plan to use.

Again, your complaints make no sense in the context of this thread, or otherwise.

I contend, still, that you do not understand your tools.


psychic stalker
Yes, it's hard to nail a screw into wood. But that's because you're supposed to use a hammer with nails, and a screw driver with screws. Doing so otherwise is a waste of your energy. Writing JavaScript like you write C# is a waste of your energy.


Someone asked what language is best for a particular job. Out of the three choices, two languages used paradigms that were suited to the task, one did not. I simply stated that one of them, Javascript (a webpage scripting language), was not suitable for this kind of task, and that one should use the right/best tool available for the job.

You then tell me that one should use the right tool for the job, but then that if I find that LANGUAGE_XYZ is the wrong tool for JOB_ABC that I must not understand LANGUAGE_XYZ correctly.

This doesn't even make sense, your argument supports my conclusion. Are you trolling? Perhaps you never read what I posted in the first place correctly.
Sitwon's avatar
  • 50
  • 100
  • 150
michaelaisgreat
Someone asked what language is best for a particular job. Out of the three choices, two languages used paradigms that were suited to the task, one did not. I simply stated that one of them, Javascript (a webpage scripting language), was not suitable for this kind of task, and that one should use the right/best tool available for the job.
What makes you think Javascript is not suited to the task? The task being Unity3D.

When the task at hand is scripting a game engine a scripting language is not a bad choice.
It's no different from UnrealScript used by the Unreal engines or Lua used in World of Warcraft, as psychic stalker pointed out.

JavaScript is entirely suitable for use as a scripting language. This is exactly the kind of task that it has been developed for. Your objections are nonsense.


Furthermore, in response to usefulness later in life, it could easily be argued that JavaScript would be the more useful language to learn. Increasingly applications are being developed for the browser rather than the desktop and we are forced to view and manipulate data on the web. JavaScript, as a client-side scripting language that is built in to most browsers, allows users to enhance their web experience through client-side automation and manipulation. For example, knowing how to write GreaseMonkey scripts is arguably a more practical skill for the average person than being able to develop stand-alone desktop applications.
Sitwon
michaelaisgreat
Someone asked what language is best for a particular job. Out of the three choices, two languages used paradigms that were suited to the task, one did not. I simply stated that one of them, Javascript (a webpage scripting language), was not suitable for this kind of task, and that one should use the right/best tool available for the job.
What makes you think Javascript is not suited to the task? The task being Unity3D.

When the task at hand is scripting a game engine a scripting language is not a bad choice.
It's no different from UnrealScript used by the Unreal engines or Lua used in World of Warcraft, as psychic stalker pointed out.

JavaScript is entirely suitable for use as a scripting language. This is exactly the kind of task that it has been developed for. Your objections are nonsense.


Furthermore, in response to usefulness later in life, it could easily be argued that JavaScript would be the more useful language to learn. Increasingly applications are being developed for the browser rather than the desktop and we are forced to view and manipulate data on the web. JavaScript, as a client-side scripting language that is built in to most browsers, allows users to enhance their web experience through client-side automation and manipulation. For example, knowing how to write GreaseMonkey scripts is arguably a more practical skill for the average person than being able to develop stand-alone desktop applications.


A scripting language vs. a programming language is not black and white, likewise, scripting vs. programming is not black and white. Instead, they are both full of shades of grey.

The task of "scripting" in a game is significantly more advanced than what Javascript was ever intended for in the first place. The fact that the same English term is used is irrelevant.

Regardless, while it is the case that people have written quite complex things in Javascript, the fact remains that Javascript is simply the only choice available for scripts running on websites - this is likely one of the only reasons Javascript is ever used in these cases.

While I don't doubt that Javascript would be adequate for simple Unity3D games, starting with Javascript can hinder further development should the developer wish to expand. The differences in complexity of a simple C#/Boo script and an equivalent Javascript script are trivial, so there isn't really any downside to not using Javascript, yet in the case of further more complex development there can be.

How is it rational to choose Javascript for this task?
Sitwon's avatar
  • 50
  • 100
  • 150
michaelaisgreat
How is it rational to choose Javascript for this task?
JavaScript, nor any of the ECMAScripts, is not as bad as you seem to think. It's not the same language it was 15 years ago, and it's not just used for web pages anymore.

Specifically, psychic stalker has already picked apart all of your complaints and shown them to be meritless. I'm not going to waste time repeating that for you, you can scroll back and read it.

In my opinion, it's unfortunate that you would have such a closed mind to any language. I have never seen any evidence to support the hypothesis that learning an inferior language first will permanently retard someones understanding of core concepts. There is anecdotal evidence on both sides, but little in the way of hard numbers.

Prototype languages are a fundamentally different way of solving problems. If you don't learn to change how you look at the problem space you will find yourself fighting your tools to do simple things. This is not unlike how people coming from C++ often misunderstand and misapply Java because they make some incorrect assumptions about the nature of Java's object-oriented model.

I leave you with a little bit of wisdom from Rob Pike, just replace any instance of 'Go' with 'Javascript' as you read this.
michaelaisgreat
A scripting language vs. a programming language is not black and white, likewise, scripting vs. programming is not black and white. Instead, they are both full of shades of grey.
Irrelevant.
michaelaisgreat
The task of "scripting" in a game is significantly more advanced than what Javascript was ever intended for in the first place. The fact that the same English term is used is irrelevant.
What makes you think that's the case? Scripting engines are event-driven data systems that make heavy use of small, testable functions in easily-separated units. JavaScript is perfectly suited to this task. (Although I don't intend to support JavaScript in my own game engine project because of the size of the two popular VMs, v8 and SpiderMonkey.)
michaelaisgreat
Regardless, while it is the case that people have written quite complex things in Javascript, the fact remains that Javascript is simply the only choice available for scripts running on websites - this is likely one of the only reasons Javascript is ever used in these cases.
Irrelevant. Also, factually incorrect:

A number of developers use CoffeeScript, Google's GWT, Microsoft's ASP.NET MVC tools, and several other tools that produce JavaScript. Google is also making a push to add Dart to the languages supported on the web.
michaelaisgreat
While I don't doubt that Javascript would be adequate for simple Unity3D games, starting with Javascript can hinder further development should the developer wish to expand. The differences in complexity of a simple C#/Boo script and an equivalent Javascript script are trivial, so there isn't really any downside to not using Javascript, yet in the case of further more complex development there can be.
Irrelevant. All of the use cases for JavaScript, save for Node.js, are by definition simple. They always involve relatively simple event-driven scripts that operate independently of a larger whole.

If we were talking about Node.js, I might agree with you. But we are not.
michaelaisgreat
How is it rational to choose Javascript for this task?
Because it is available, and the knowledge gained is valuable in wide domains.

Indeed, it's valuable even if you don't use it again. Learning a language gives your mind the tools to think more creatively about new problems. It's why I tell people to learn a new language whenever they have the opportunity and the time, because it makes you a better programmer.

Sitwon
I have never seen any evidence to support the hypothesis that learning an inferior language first will permanently retard someones understanding of core concepts. There is anecdotal evidence on both sides, but little in the way of hard numbers.
I have. Learning BASIC impeded my learning process for several years.
Sitwon's avatar
  • 50
  • 100
  • 150
psychic stalker
Sitwon
I have never seen any evidence to support the hypothesis that learning an inferior language first will permanently retard someones understanding of core concepts. There is anecdotal evidence on both sides, but little in the way of hard numbers.
I have. Learning BASIC impeded my learning process for several years.
Is that not a prime example of the kind of anecdotal evidence I was decrying?

Can you prove (through statistical analysis of a suitable sample size or repeatable tests conducted with scientific method) that learning BASIC was the most significant factor in producing the observed outcome?

Many of the best programmers today started with languages that are now perceived as inferior.
Sitwon
Can you prove (through statistical analysis of a suitable sample size or repeatable tests conducted with scientific method) that learning BASIC was the most significant factor in producing the observed outcome?
Dijkstra certainly seemed to think he could.

But given the difficulty in measuring objectively the proficiency of a programmer, isn't the answer obvious?

Regardless, I don't think that matters. BASIC is a poor language for introducing anything beyond the simplest concepts of unstructured procedural programs; an undesirable thing at best. Even viewing it form the perspective of how not to program, C++ is a far better first language in that regard.

And you know how I feel about that.
Sitwon
Many of the best programmers today started with languages that are now perceived as inferior.
To be fair, BASIC is a mind-numbingly bad language for any kind of work. Its lack of some very basic concepts and inconsistent use of others leads people to make bad assumptions when they're introduced to new languages. As an example, short-circuiting boolean operators come as a big surprise to a lot of BASIC programmers, especially to those who used VB.

I suppose I was lucky that the CBM dialect of BASIC mapped fairly well to 6502 assembly, but it did nothing to help me learn C until I'd learned x86 assembly fairly well (which uses pointer registers more than 6502/6510 does).

Quick Reply

Submit
Manage Your Items
Other Stuff
Get Items
Get Gaia Cash
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff