You are here |
yotam.net | ||
| | | |
kishstats.com
|
|
| | | | Type hinting was added to the Python standard library starting in version 3.5. Python, being a dynamically typed language, does not enforce data types. Howev... | |
| | | |
www.integralist.co.uk
|
|
| | | | Introduction This post is going to cover a few tools and features I plan on using when writing Python code in 2019. I've grouped these into the following sections: Type Hints and Static Analysis Interfaces, Protocols and Abstract Methods Dependency Management (with pipenv) (OUTDATED! ?) ? read my post "Python Management and Project Dependencies". But before we get into it... time for some self-promotion ?? Want to be up and running quickly with Python? | |
| | | |
avelino.run
|
|
| | | | Apple launched the Swift language (Looking for the Swift parallel scripting language? Please visit http://swift-lang.org) at WWDC 2014. A modern language to program for Mac and iOS! Strongly typed language, where you explicitly what type (variable, arguments, and function returns), syntax reminds dynamic languages with Python, Go, Ruby and JavaScript. Apple offers a free comprehensive guide on language in HTML and iBook formats. We can put zero left freely to improve readability, insert _ to separate groups of numbers and add the + in front. That server to improve readability of the program (does not alter the value of the number): let a = 1000000 let b = 0.0000001 // readable let a = 1_000_000 let b = 0.000_000_1 Practical numerical ranges: 0..5 and 0...5 (Ruby) Unicode variables: let ? = 3.1415926 Tween strings (expand variables and expressions inside strings): var name = "Thiago Avelino" var yaer = 25 println "Hi, my name \(name), 'm \(year) years." Few functions/methods native to strings works: hasPrefix hasSuffix uppercaseString lowercaseString countElements isEmpty Not have regular expressions Ternary operators: (condition ? yes : no) I liked the language, as 'm used to not bother me Go explicit types, lack of regular expression can be a problem seems, but it is a pleasant language to learn! | |
| | | |
donsbot.com
|
|
| | A common misconception from non-Haskellers is that Haskell, when compiled, pays an ongoing penalty for supporting laziness by default. The idea is that in a lazy language, every expression would suspend to a heap-allocated, garbage collected, thunk. Even if you were to use the variable immediately. That sounds scarily expensive. In the real world however,... |