Why Flutter team decided to use Dart as main language?
Dart is compiled to JavaScript so why not using JavaScript as the programming language of Flutter? I mean the idea of: "it compiles to native" does not stand as there are other JavaScript framework to use or compile (?) to native code (like https://nativescript.org/)
[Edit]
A related question might be : Flutter - How does it work behind the scenes?
Your premise is wrong. Dart is not compiled to JS.
It is only compiled to JS when you target the web, one of many possible targets and not the first one. As always with JS, it's not done because JS is a good language to work with, it's because it's the only thing that will reliably (cough) work in browsers.
You can read a more in depth explanation in the documentation
dart language has lot of feature that doesn't exist in javascript
and google create dart to replace js in web so they decide to push further dart language more and they succed with it.dart language more power than js
Related
I'm learning Dart since I soon want to use Futter for different personal projects, but now that I've gone through this interesting video, I'd like to develop small projects directly using the language and libraries that are in puv.deb.
So far I have only found this exercise which I found very interesting, but all the other projects I find always directly use Flutter. I have also already managed to do the Codelab and other exercises on the Dart website.
What types of projects could you migrate from other languages to try to implement in Dart?
I would appreciate links to websites or videos where they develop projects in Dart
I'm currently trying to use Azure Authentication within my Flutter app. I've searched and have not found an existing library that supports MSAL/AAD for Flutter on Windows.
If I use the MSAL package within Visual Studio for a WPF app, the authentication works fine, so the app within Azure is set up correctly. I think I need to use the legitimate client tooling that Microsoft provides in order to get my tokens and such.
Unfortunately, Flutter doesn't provide any integration with .NET, so I can't write a platform-specific integration in .NET and then the rest of my app in Flutter, so that's a shame. But it seems like Flutter can reference a standard C library.
It also seems like Microsoft makes a client for Go, and Go can compile to a C Shared library. So, in my mind, I should be able to compile this library to a C Shared library, and then write up my platform specific implementation in Flutter. In my attempts to build the MSAL GO library so far, it seems like because the MSAL GO library (https://github.com/AzureAD/microsoft-authentication-library-for-go) lacks a main method, and is more to be used as a plugin, so it can't be built directly into a c-shared library by Go.
How can I build the Microsoft MSAL library as a c-shared library? Please note, I am hilariously new to Go.
This does not answer your question directly, but it has been done without any plugin or native development, as far as I understand:
https://blog.objektkultur.de/azure-ad-authentication-flutter-apps/
I also looked up available libraries for AzureAD, and besides the Go library there seem to be versions for Java and ObjectiveC, which you could use to develop your own integration using Flutter platform channels for example.
If you really want to use Go from within Dart / Flutter, I would try to compile the Go code to web assembly and use something like:
https://pub.dev/packages/wasm
No guarantee, this leads in the right direction, though.
It's probably not a programming question and a bit too generic but I can't find any resource about the differences of writing plugin for flutter using Kotlin vs Java. From my research, almost every plugin in pub.dev that I found is written in Java. I don't say Java is bad but I personally prefer Kotlin over Java because of the syntax.
I'm planning to build native code to interact with native libs both on iOS and Android for my project since I couldn't find any plugin that satisfy the project requirements. I'd like to share it on pubdev when it's done (hopefully) so I have to think twice before writing it.
The question is, if I do so (developing Kotlin-based plugin), will it make any difference? Like maybe requires the user to add some extra configuration to their project? Or maybe any Flutter project that uses Java can't use my package? and.. will it do the same for iOS (using Swift over Objective-C)? The docs is telling us that we can switch both in between, but doesn't tell any side effects about it.
No there is nothing to worry about. Flutter apps are now by default created with Kotlin/Swift and not with Java/ObjC. Of course if someone has an ultra old Flutter configuration, then he might have some problems but I wouldn't concern myself with it.
All the native plugin code is converted to a Gradle dependency or Pod(spec) dependency. The app developer doesn't have to care about it and that is a good thing.
I am totally new to creating extensions in VS Code, and all the official examples of extensions are written in Typescript/Javascript, which I have no experience with. Is it possible to create VS Code extensions in other languages, such as Python or C++?
If so, could anyone point me to any resources to get me started?
It is possible by creating a C++ module for Node.js, which can then be loaded like any other node module. Of course, some glue code written in JS or TS is necessary to register the extension and translate calls to/from vscode.
I've gone this way in my ANTLR4 extension, but gave up eventually, because of the troubles I had due to incompatible dependencies (you have to make sure the extension uses the exact same V8 version, which was used to build the underlying Node.js used by vscode, on all supported platforms).
This situation might have change, I don't know, but with that in the background I don't recommend it.
If you want to add support for a new language in vscode you can also write a separate language server, as is mentioned in the linked SO answer. For other type of work, I'm afraid, you have no alternative to use.
No, as #rioV8 said, since VSCode is an electron app and runs on Javascript.
I am using Corona to develop ios app.
I use XCode as IDE.
But I found that XCode does not support Lua syntax sensitive reminder as it does in Objective-c.
Is there an Mac IDE can integrate Corona keyword dictionary and highlight to help and accelerate coding?
And if it can support project files navigation will be better!
Welcome any comment
TextAdept might also be interesting, since it's super-extensible, and already has an LPEG lexer for Lua, which could easily be adjusted for supporting Corona. And everything is scripted in Lua, so no extra language to learn ;)
You may try ZeroBrane Studio Lua IDE. I've recently added Love2d and Moai auto-complete (there are several demos on the website) and it should be possible to add Corona API too, but I can't find a good description or documentation for the API calls.
The APIs I've implemented provide not only function names, but also a description, arguments, and return parameters (this is a snippet from one of Moai functions):
addChild = {
type = "function",
description = "Attaches a child action for updating.",
args = '(self: MOAIAction, child: MOAIAction)',
returns = '(self: MOAIAction)',
},
If there is a description like this for Corona SDK, I should be able to incorporate it into the IDE.
This might be interesting. Its provided by the community and not very stable, but, its worth a shot.
This shows a eclipse walkthrough.
The Lua plugin in IntelliJ has support for the Corona API (full disclosure I am the author)
https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Home