Тёмный

C# vs JS syntax - Unity Official Tutorials 

Unity
Подписаться 1,2 млн
Просмотров 130 тыс.
50% 1

Watch this video in context on Unity's learning pages here -
unity3d.com/lea...
Some of the core differences between C# and Javascript script syntax in Unity.
Help us caption & translate this video!
amara.org/v/V6ce/

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 83   
@this.channel
@this.channel 9 лет назад
I would have liked to see this tutorial go a little further and illustrate some Unity3D game functionality written in both languages side by side.
@trenthogan4212
@trenthogan4212 9 лет назад
C# is a lot faster. I know both but I much prefer C#
@kocaksaid
@kocaksaid 8 лет назад
faster how? pls explain master
@trenthogan4212
@trenthogan4212 8 лет назад
Faster to code and it is lower level troll. JS is shit. I hate it.
@elijahlucian
@elijahlucian 7 лет назад
not really a great explanation...
@realprisec
@realprisec 4 года назад
@@trenthogan4212 you're just a hater at that point
@popl53
@popl53 4 года назад
@@trenthogan4212You are an idiot
@kebrus
@kebrus 11 лет назад
while mostly negligible c# is indeed a lit bit faster, but mainly because it forces you with good practices, the only real improvement over js are delegates which don't exist in js, if you are starting now go with c#, if you already know js you may to stay with it a bit longer but i would advise you to start working with c#
@Spudtion
@Spudtion 11 лет назад
It was added with C# version 3.0, so if you've not used C# since 2008 (or had to stick with 2.5) then it's not something you'd have come across. Basically, it just means the compiler uses the context to determine the type. There's also the dynamic keyword, which means the type isn't determined until runtime.
@slader1662
@slader1662 10 лет назад
I prefer JavaScript because it looks much cleaner and it's easier to read.
@asdqwe4427
@asdqwe4427 10 лет назад
Write a big program in js and one in c#, then say that again.
@Chubzdoomer
@Chubzdoomer 10 лет назад
Funnily enough, I feel the exact opposite. I can't stand the "var varName : varType" syntax. To me, the first word is almost insulting--like I'm not smart enough to know that a variable is what's being declared. And having the variable type come _after_ the name is, to me, counterintuitive. I like to know _exactly what it is_ I'm dealing with before I know _what its name is_. The same thing even applies to functions. It's almost as if the syntax is written backwards, perhaps for people who read right-to-left. I find it to be an awkward language to decipher and work with.
@Ciprian-Amarandei
@Ciprian-Amarandei 8 лет назад
+Chubzdoomer how about explicit casting in c#, where int x=9 != to float x=9.0 or even long x=9 ??? what is the point in that?
@Ciprian-Amarandei
@Ciprian-Amarandei 8 лет назад
+Chubzdoomer and the new keyword is used excessively, even when you don't even need to specify another constructor except the default one.
@OnanTheMan
@OnanTheMan 8 лет назад
Thank you! This is so true
@BigBang1112tm
@BigBang1112tm 10 лет назад
C# is faster, but JavaScript easier to read, so JS is better for smaller programs. I prefer C# more than JS.
@BigBang1112tm
@BigBang1112tm 7 лет назад
wait what the fuck did i said xD
@mayanphsyco
@mayanphsyco 10 лет назад
I don't understand why the hell they use boo and not java, especially since android devices ARE java. I'm pretty sure much more people know java instead of boo
@nachik09
@nachik09 9 лет назад
+mayanphsyco C# and Java are similar syntactically and if you know one, you can pick up the basics of the other in minutes and thats all you need to know for this. On the other hand, boo is Pythonic and very elegant like other Python influenced languages. Having both C# and Java options are pointless. OTOH, Python like and C# and Javascript makes more sense.
@boblester122
@boblester122 11 лет назад
wow well, this explains allot easier..
@Chaosxaos
@Chaosxaos 7 лет назад
how old is this.... 2013....
@WillLianti
@WillLianti 6 лет назад
Javascript seems simpler, but harder do more complex things. Tutorial is good.
@ЯрославЗинченко-ц4ш
I have created Russian subtitles using Amara.org, but they have not appeared on RU-vid. What should I do if I want them to appear on RU-vid?
@lchngh
@lchngh 11 лет назад
This will start a comment war on which language to use.
@MrKingx555
@MrKingx555 11 лет назад
Hello! I wan't to ask,will you ever make a javascript tutorial? When i go to Unity website it is all C#.Even i am super noob and have no programming experience i do understand variables,a little functions,if statements and couple more of those stuff,so i don't really wan't to go and watch C# when i made some progress in Javascript...Official Javascript would be awesome so answer please..
@zig3
@zig3 11 лет назад
Java or JavaScript? either way it is defiantly not they best programming or scripting language out there.
@3p1cd3m0ns14y3r
@3p1cd3m0ns14y3r 11 лет назад
What exactly is wrong with javascript? Isn't it easier not having to constantly say the datatype of every variable and function?
@BorisMediaProds
@BorisMediaProds 11 лет назад
C# is obv. better
@faizpoerwita
@faizpoerwita 11 лет назад
Java Script is Better than C# :)
@lancemccormick7598
@lancemccormick7598 10 лет назад
No one is claiming Boo? wtf is this shit? Boo is more readable and cleaner code. I'll take less typing over C# and UScript any day. And when it comes down to it all 3 are compiled down into the same shit, so performance should really not be a factor. Give the python community more love god damnit Unity! Where is the C# vs JS vs Boo video? Stop neglecting us. I want more than just Boo text examples! Equal time for the Boo users!
@buddhadebsarkar1708
@buddhadebsarkar1708 2 года назад
Unity no longer supports JS...
@muffdriver69
@muffdriver69 11 лет назад
C# relates more to the native Java/C/C++ that I am used to. JavaScript is like the simplified short hand of Java but for noobs. So I'm sticking to C# only because it's what I was used to along time ago.
@SilenceStabber
@SilenceStabber 10 лет назад
Javascript is nothing like Java.... Javascript is more function based, while C# and Java are more object based.
@SilenceStabber
@SilenceStabber 10 лет назад
C# > Javascript. Sadly the whole webs runs on Javascript...
@unite5870
@unite5870 10 лет назад
C#
@a_void
@a_void 9 лет назад
Web runs on Javascript because it's easier to read and write. You can compile C# into Javascript if you need. Use asm.js for minimal performance loss.
@SilenceStabber
@SilenceStabber 9 лет назад
***** Javascript easier to read? Have you ever seen a callback mess? I don't want to know what kind of mess a C# to js converter would bring.
@durchschnittlich
@durchschnittlich 7 лет назад
I hope you've heard about WebAssembly by now
@youngjinkim8552
@youngjinkim8552 5 лет назад
what a pity web world...
@cdjwmusic
@cdjwmusic 10 лет назад
i got used to object oriented languages like java so for me C# is better, and more organized than javascript (since you have stuff from biggest to smallest)
@dalanxd
@dalanxd 11 лет назад
Js sucks, C# RULES!!!
@michaelemanuele5285
@michaelemanuele5285 10 лет назад
To the Unity Team* Which do you prefer to use?
@Chubzdoomer
@Chubzdoomer 10 лет назад
I'm not a member of the Unity team, but most (if not all) of the tutorial videos and live training sessions are done in C#-only, so there you go.
@VYKco
@VYKco 6 лет назад
most are C#, its better.
@mikesineath
@mikesineath Год назад
Javascript typing is not required. This more resembles Typescript.
@blendernoob64
@blendernoob64 6 лет назад
i started with javascript back in the day, and used it my whole time in Unity. Now I head that C# is the dominant language and javascript has gone the way of the dinosaurs. New language to learn now i guess
@moisesjp
@moisesjp 11 лет назад
I'm learning JavaScript, to declare funtion I used: var functionName = function(parameter : int) : int{}; It worked but do you recommend it?
@lactobacillusbulgaricus6058
@lactobacillusbulgaricus6058 3 года назад
888k subscribers ?? and 88 commments ??!!!
@Unity3DGameCreator
@Unity3DGameCreator 11 лет назад
Thanks for the guide! Hope to see more info on this, I m migrating from js to C#, but experienced lot of code structure different. Hope you could provide more sections on the differents between C# and js. Thanks again!
@MrAndrewrock
@MrAndrewrock 10 лет назад
So, if I'm starting now should I choose JavaScript?
@Chubzdoomer
@Chubzdoomer 10 лет назад
Go C#. Most, if not all of the official Unity tutorials (and live training sessions) are done in C#-only. Plus it arguably has several advantages over Javascript.
@drag0n948
@drag0n948 8 лет назад
+MrAndrewrock if your new use javascript, and DO NOT use the official tutorials, they are outdated and leave you more confused than you were at the start
@OnanTheMan
@OnanTheMan 8 лет назад
There's more support for C# including tons of information outside of the unity community. The JavaScript that Unity uses is sort of "tuned" for working in unity and doesn't really apply anywhere else.
@teddybaker4759
@teddybaker4759 4 года назад
UnityScript is a straight hallway that goes right to the room you're looking for. C# is a confused series of hallways that goes all the way around the building. It's a shame Unity no longer supports UnityScript.
@cloregaming1173
@cloregaming1173 7 лет назад
c# is harder and complicated but way better JavaScript simple fast but not the best
@dalanxd
@dalanxd 11 лет назад
1- in C# also exists the keyword var, u can type things like: var x = 5; var ball = new Ball(); 2- using var is a bad habit, it makes your code less intuitive. What do u prefer: spend a little more time in your code by typing a larger and intuitiver variable name and later, when u reuse that code its beautifull; or use something like var, that will save you the time of typing a couple more letters. 3- Just kidding, bro, just trying to piss java scripters off xD
@unite5870
@unite5870 10 лет назад
code war xD
@mistertrueromance
@mistertrueromance 11 лет назад
man JS is much easier but yet again my grammar sucks :)
@WARnationLD
@WARnationLD 11 лет назад
yes C# is a bit faster
@fayezsalka
@fayezsalka 11 лет назад
why the video is unlisted?
@3p1cd3m0ns14y3r
@3p1cd3m0ns14y3r 11 лет назад
Wait, you can use the term "var" in c#? How did I never hear of this...
@avichalsingh992
@avichalsingh992 9 лет назад
Hi, on 1:16 in the C# window isn't the return FunctionName(type parameterName) supposed to be type FunctionName(type parameterName)
@avichalsingh992
@avichalsingh992 9 лет назад
Luiz Vaz hey thanks for making that clear. so return itself is a type :)
@alexandresc404
@alexandresc404 11 лет назад
try codecademy com =]
@Ubicray
@Ubicray 11 лет назад
What about Boo?
@imaruckanucka
@imaruckanucka 11 лет назад
Ok, Kid
@songersoft
@songersoft 9 лет назад
Ace
@WaterCraftHD
@WaterCraftHD 11 лет назад
nope....its JavaScript :)
@skydrow4523
@skydrow4523 7 лет назад
Write a big program in js and one in c#, then say that again. #CSharpIsThebest
@specialrelativity
@specialrelativity 9 лет назад
please answer me i wan't to start learning unity ,which one is better c# or java script
@killereks
@killereks 8 лет назад
js
@drag0n948
@drag0n948 8 лет назад
+gamerGiant Javascript
@OnanTheMan
@OnanTheMan 8 лет назад
C# is more readable in my opinion
@Malicos
@Malicos 7 лет назад
Jabba the Script is much easier to learn
@VYKco
@VYKco 6 лет назад
there are many more tutorials made in C#. C# is better anyways.
@lespaul2664
@lespaul2664 8 лет назад
In my opinion it supposed to be c++ and java. I really don't understand why on earth they preferred c# over Java.
@kocaksaid
@kocaksaid 8 лет назад
because they are not script languages?
Далее
Is C# Better than JavaScript?
17:53
Просмотров 4,4 тыс.
C# Syntax Basics - Rules of Coding in CSharp
14:55
Просмотров 1,3 тыс.
Дикий Бармалей разозлил всех!
01:00
Cameras - Unity Official Tutorials
8:19
Просмотров 182 тыс.
Raycasting - Unity Official Tutorials
4:47
Просмотров 316 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 566 тыс.
The Ultimate Tier Programming Tier List | Prime Reacts
26:57
C# vs Node
11:09
Просмотров 19 тыс.
Time Ghost | Unity 6
4:27
Просмотров 281 тыс.
Why Should I Choose C# As My Programming Language?
18:50
Every single feature of C# in 10 minutes
9:50
Просмотров 132 тыс.