|
So, it's yet another scripting language? No thanks.
|
|
|
|
|
No, it's not a scripting language. It compiles into machine code using LLVM.
|
|
|
|
|
Compiled/interpreted isn't a determinant of whether or not a language is a scripting language.
BASIC can be either, yet isn't a scripting language.
Perl can be either, yet is a scripting language.
|
|
|
|
|
You're right. See the sample code in the next message.
|
|
|
|
|
|
No. Here's a small sample I was messing with
module A
function ProcessDir(topDir)
global dirCnt # Declare these variables as global so they
global fileCnt # can be used in the main code.
global totalSize
# Read recursively through the top, counting directories and files, totaling the
# file space used and printing the directory or file name to stdout.
for (root, dirs, files) in walkdir(topDir) # walkdir function returns tuples
for dir in dirs # Count directories i
aDir = joinpath(root, dir) # Create fule path name--same as "root * '/' * dir"
dirCnt += 1
println("Directory # ", dirCnt, " = ", aDir)
end
for file in files # Count files and total file sizes.
if ((file == ".") || (file == ".."))
continue
end
if (endswith(file, ".md")) # Select only files with a suffix of "".md"
fileCnt += 1
fn = joinpath(root,file)
sz = stat(fn).size # Get file permissions and file size
totalSize += sz
println("File # ", fileCnt, " = ", fn, ", size = ", sz)
end
end
end
end
# Main processing in this module
dirCnt = 0
fileCnt = 0
totalSize = 0
subDir = ".julia"
println("Starting directory processing")
ProcessDir(joinpath(homedir(), subDir))
println("Directories = ", dirCnt, ", Files = ", fileCnt, ", Total size = ", totalSize)
end :
|
|
|
|
|
IMHO, needing to keep your statement confined to a single line gives me more of a 1970's feel, than anything elegant. I don't feel like a lack of semicolons is a help, and it's one of the things I like least about Python.
|
|
|
|
|
Statements do not need to be confined to a single line.
And semi-colons are permissible end-of-statement markers, just like C/C++.
|
|
|
|
|
|
Does look a lot like Fortran.
|
|
|
|
|
It has been initially designed for scientific computing, like Fortran/ADA/PL-I/etc.
|
|
|
|
|
|
Not sure about what you mean with Quote: classAVar = <some_kind_of_cast> classB.getter().toclassA().... but probably auto mitigates it.
By the way, it looks interesting. Thank you for posting.
|
|
|
|
|
The way I understand julia is that all variables are "auto" unless you explicitly type them.
The example I used was kind of a generalization of a lot of C++ code I've looked at where I had to read through a bunch of noise to get to what was intended.
|
|
|
|
|
Quote: The way I understand julia is that all variables are "auto" unless you explicitly type them. So it is the other way around.
Quote: The example I used was kind of a generalization of a lot of C++ It looks 'pre-auto' code.
|
|
|
|
|
A lot of the code I mess with is pre-auto, some of it is even pre-computer.
|
|
|
|
|
A new programming language will save you from that just for few happy moments.
|
|
|
|
|
Lack of strong typing means huge runtime bugs when things scale.
People need to stop writing junk software in junk langs only good for basic code scripts.
Has javaScript / Python taught anyone anything? Bloated, slow and more prone to runtime bugs all thanks for the lack of strong types. No thanks in hell.
|
|
|
|
|
I agree. Javascript is a giant PITA but I'm guessing it grew out of people trying to do simple things easily. It has just out-grown its pants.
|
|
|
|
|
Its grew out in the 90s and people still use it. Hopefully with WASM we see it fade away.
|
|
|
|
|
|
|
Nice! But my kids are still teenagers...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
But you aren't.
I'm hiding from exercise...I'm in the fitness protection program.
JaxCoder.com
|
|
|
|
|