|
C# requires a VM. C does not.
I wrote that. I can defend it. The CLI is a virtual machine. Its instruction set is IL. Its runtimes are the CLR.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
But it will compile finally to the target machine native processor code
|
|
|
|
|
It's JIT compiled, which is an implementation detail of the VM, similar to javascript on a modern browser.
Furthermore, setting aside that, it still cannot manage memory without the CLI, even compiled to native code. It requires the virtual machine in order to do basic operations. That machine is not simply part of the run time library like C's heap stuff. It's garbage collected - a process.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Well said. Good words.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
As OriginalGriff said the similarities between C and C# are pretty superficial. It's really just syntactical: braces for for blocks, semicolon statement separators, simple data types (int, char, float, etc.) and simple control statements (if, for, while, etc.), other things I can't think of right now.
C, C#, C++, Java, Go, Rust, Kotlin, others? All share much of this same basic syntax. It makes it somewhat simpler to learn or move between them.
My understanding is C# was Microsoft's answer to Java after losing it's court case against Oracle over the future of Java in the late 1990's.
|
|
|
|
|
As an old member here answered once...
Do not forget that my compiler compiled your compiler.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
A proper C compiler is implemented in C and compiles itself.
|
|
|
|
|
Doesn't that hold for the great majority of languges/compilers since around 1970?
Usually you need to create a small bootstrap in some other language. I was told (so I have no URL to back it up) that Nick Wirth attempted to write a compiler for the very first, super simple core Pascal (1970) in Fortran, but gave up and reverted to assembler - I don't know for which machine. Once this was running, all following extensions to full Pascal was written in the simpler Pascal dialect, as is the common strategy for all language/compiler bootstrapping.
I guess that languages deviating a lot from the algorithmic style (such as APL, Prolog, SNOBOL, Lisp, ...) have compilers / interpreters written in other languages, at least for production work. (I would be sort of surprised if no APL programmer has written an APL interpreter in APL!) But for the algorithmic languages group, the great majority have compilers expressed in themselves. This, of course, does not prohibit compilers written in other languages - I guess one main reason for that is that the compiler developer knows C only.
I know of one case where no bootstrapping in another language was required: The compiler was written in itself. Its developer put the compiler source up on the document holder by his keyboard, and compiled each statement in his head, typing in the machine instructions he knew that the compiler would generate. Of course he knew - he had written the compiler! This was in 1974.
Admittedly, this was a rather simple language - abstraction level was lower than K&R C. Yet it illustrates the principle of writing a compiler in its own language.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
You can end any initializer list and enumeration with a comma, just as in C.
... = { 1, 2, 3, };
Dennis M. Ritchie (may God rest his soul in peace) wrote that he was always forgetting to include a comma at the end of a row, when editing/extending such a list, and therefore changed the underlying grammar so that the C compiler accepts a last comma.
40 years later and many derived languages, nobody dared to change this.
It would be interesting to check if this syntax still applies to "modern" languages like JavaScript, Rust etc.
|
|
|
|
|
I learned C# many years ago coming from a Delphi background.
I found C# not that different from Delphi if you substitute begin and end with { and }
After all they were both developed by the same person. (Anders Hejlsberg - Wikipedia[^])
|
|
|
|
|
Has anyone noticed that when you get a vscode update, the release notes never call out the bugs that were fixed.
<snark>I bet it's because the list is so large that it would cause the release notes file to be larger than the max possible size...</snark>
<moresnark>How do they exppect us to be able to reliably develop our own buggy code if the tools they provide us are so buggy?</moresnark>
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
They expect us to be dazzled by the list of wonderful enhancements.
|
|
|
|
|
The latest whiz-bang is "text to speech".
Speak this MS - "I don't give a f*ck about text to speech.".
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Still better than the vast majority of "app store"-type release notes, which are invariably some variation of:
Release Notes: Bug fixes and performance improvements.
Sometimes with slightly more embellishment, but it usually translates to the same meaningless BS.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Or so short, because they didn't fix a damn thing.
If you can't find time to do it right the first time, how are you going to find time to do it again?
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
Microsoft fix bugs?
When did they start doing that?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Microsoft fix bugs?
No need when you can just enhance over them.
User: "Microsoft, have you fixed the xyz bug?"
MS: "Did you see the list of 300 enhancements including new fonts and icons?"
User: "Oh, look at all the shiny."
|
|
|
|
|
Of course they wont fix bugs.
They just rename/renumber them.
Of course they can't put that in the release notes.
Error 62316: File not found => Error 86549: Miscellaneous input/output conflict.
|
|
|
|
|
Misc bugfixes...
You can always check the list of issues closed for that release on GitHub
|
|
|
|
|
I tried VSCode and never found it a good solution for my needs. As a pure editor it's worse than VisualStudio + VisualAssistX, for C# or Windows C/C++ code it's worse...
I found it acceptable for Python but I wrote 100 lines of Python in my whole life so take it with a deposit of salt.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
The shortest horror story: On Error Resume Next
|
|
|
|
|
I've never felt the need to use VS Code rather than Visual Studio.
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
We have to because we're coding in javascript/react...
I really enjoy it when the vscode debugger randomly creates a breakpoint in one of the bundle files or randomly deletes a breakpoint on its own, or when you paste code into a file, it automatically scrolls you to the bottom of that file (a true pain when that file is thousands of lines long, or when code thinks there's an error when it obviously isn't but the crappy intellisense simply hasn't caught up with your typing...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
All I can say about VS Code is that when it was first introduced, I was rather excited to see a decent "plain" code editor from MS that could load in roughly the same amount of time as Notepad (definitely quicker than Visual Studio itself) when all I needed was to just take a quick look at some source with something that has at least a little bit of intelligence (enough to understand the syntax).
Then they quickly proceeded to throw in everything but the kitchen sink, and it rapidly lost the ability to load quickly. It's still quicker than the full-blown Visual Studio, but it's now slow enough I can't say it serves that purpose anymore...
|
|
|
|
|
Notepad++ is my favourite quick editor.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
The shortest horror story: On Error Resume Next
|
|
|
|
|
Yeah, I've used Notepad++ for years (I still have it installed on a system or two and keep it up to date), but man, it's still ugly as sin.
|
|
|
|