Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by danielvaughn on Wednesday January 11, 2023 @04:37PM
(#34345288)
Forgive me, is swift not in the c family? I could have sworn that it was, but I'm not overly familiar with it.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by kibwen on Wednesday January 11, 2023 @04:46PM
(#34345401)
Lots of languages, including Java and Javascript, have been described as being "in the C family", but this papers over a whole lot of important details. Swift is a low-ish-level imperative-ish language with C-ish syntax.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by obliquely on Wednesday January 11, 2023 @05:00PM
(#34345589)
You could just as plausibly say that Swift is a high-ish-level functional-ish language with a modern syntax. Whereas C blows up at runtime, Swift nags-and-whines at compile time - in that way it's very unlike C. All that said "in the C family" is highly ambiguous at best...
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by BuckRogers on Wednesday January 11, 2023 @05:20PM
(#34345865)
When I hear that C family languages are no longer to be utilized, I’m assuming they mean memory unsafe options. C & C++.
Everything else is just as good of an idea as the next. C family is the most successful language paradigm in the history of software. Abandoning those constructs would be suicide. Nothing would get done.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by pyth0 on Wednesday January 11, 2023 @04:50PM
(#34345452)
I would think it is. It runs on the Objective-C runtime and has interop with it and C.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by SimDeBeau on Wednesday January 11, 2023 @05:11PM
(#34345746)
It was built to interop well with obj-c which is a c superset, but it’s not a c-family language more than something like c# or kotlin
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by jcranmer on Wednesday January 11, 2023 @07:21PM
(#34347181)
As I would use the terminology, the C family of languages generally corresponds to languages that follow C's general syntactic rules, such as how you represent operators (particularly = is assignment and == is equality), curly braces for blocks, and to lesser degrees, making distinction between statement/expression, or having types precede variable names.
"C-like", by contrast, is a language whose semantics follow closely to C, and in particular, the C-with-extensions languages like C++ or Objective-C are usually going to fall into this category.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by phpisthebest on Wednesday January 11, 2023 @04:02PM
(#34344751)
>>Microsoft says new stuff should not be written in c like languages anymore
Microsoft is dropping C#? Source for that?
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by diroussel on Wednesday January 11, 2023 @04:07PM
(#34344844)
C# is not a C-like language. It's a managed runtime with garbage collection.
However Mark Russinovich, CTO of Azure did say that it's time to drop C and C++
https://twitter.com/markrussinovich/status/15719951172335042...
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by ccouzens on Wednesday January 11, 2023 @04:09PM
(#34344879)
Based on the context I think by "c like" they meant languages with a culture of dealing with raw pointers. c# is c by name and curly braces, but primarily uses managed memory
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by mplewis9z on Wednesday January 11, 2023 @04:04PM
(#34344799)
Calling C# a C-like language is like saying JavaScript is a descendant of Java.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by babypuncher on Wednesday January 11, 2023 @04:40PM
(#34345315)
C# is C-like in syntax only.
Syntax isn't the reason why C and C++ are falling out of favor.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by bfrog on Wednesday January 11, 2023 @04:03PM
(#34344786)
C# is a lot closer to Java if anything, should clarify to be c and c++
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by jon-wood on Wednesday January 11, 2023 @04:05PM
(#34344819)
I think the GP probably poorly phrased that. “Memory unsafe languages” would be a better term, apart from the basic syntax C# really isn’t very C-like.
Re:Apple Announces Full Swift Rewrite of the Foundation Fram...
by AppleBananaPie on Wednesday January 11, 2023 @04:05PM
(#34344813)
could be worded better but from context in the sentence I read that as c/c++
There seems to be a trend here.