7/2/2023 0 Comments Cmake function![]() Swift follows an open process for language evolution. ![]() This is a great update for Swift, and it couldn't have happened without the Swift community, the contributors and users of the language who gather at, working together to evolve the language and support new initiatives. We'll talk about some ways it's easier to express what you mean using Swift's clean syntax, some powerful new features that help framework authors make their new APIs more natural to use, and we'll look at some new ways to get more control over performance and safety in low-level code.īut let's start by talking about the Swift open source project. ♪ ♪ Ben: Hi, and welcome to "What's New in Swift 5.9." I'm Ben, and together with my colleague Doug, we'll take you through some of the improvements to the Swift language this year. Search the forums for tag wwdc2023-10164.Have a question? Ask with tag wwdc2023-10164.32:41 - What's new in Swift Concurrency.2:44 - Using if/else and switch statements as expressions.We'll also take you through improvements to interoperability and share how we're expanding Swift's performance and safety benefits everywhere from Foundation to large-scale distributed programs on the server. We'll show you how APIs are becoming more extensible and expressive with features like parameter packs and macros. How else would one call legacy functions doing set(.Join us for an update on Swift. ![]() So even if we got such a system, having return values in “classic CMake” would be good, because they would offer a nicer FFI between the old world and the new world. Let’s be real, is it really going to happen?īesides, and grand new system will have to have pretty good interoperability with existing CMake modules to be a viable successor in practice. It’s just about trying to recover the little Scheme hiding within every other language.įor reference, CMake Issue 19891 has some discussion about alternative specification language design.Ģ years on, that issue is unsurprisingly a cesspit of random ideas, bikeshedding, and scope-creap - the second-system effect. We know from other languages where this road leads, and it’s not to C++/Scala madness. The language is not well-suited to such extension IMO. Then people will ask for inline operators, etc., and complexity will keep increasing. Languages like Javascript, Java, hell even Excel have added new “functional” syntaxes over time, and I don’t think there has been any complaint of code becoming harder to read because more side effects! Quite the opposite, in fact! The people that dislike having to set(.PARENT_SCOP) are also the people that will try to stay away from gratuitous side effects! The point of being more functional to allow code that has fewer side effects. Function bodies already have side effects. Why does this matter? Statements already have side effects. Once functions have return values, arbitrary expressions with side effects will be possible as discussed above. The more important change is the function() modification that promotes local variables to parent scope don’t follow the logic behind your answer. I’ll add that if it needed to be a command, then any of a number of alternative syntaxes would work set(VARS var1 TO example1(foo bar))Ĭmake_language(OUT var1 CALL example1 foo bar) Plus some special syntax for parameter pack expansions (unquoted $") # prints '- X = baz, Y = hello' Or really, that the expression language is exclusively string literals, variable lookup, and concatenation. ![]() The real complaint is twofold: (1) there isn’t a single function return mechanism and (2) function application is not an expression. Of course CMake functions can return values (via set(. ![]()
0 Comments
Leave a Reply. |