Mark Russinovich SysInternals - time to ditch C/C++ for Rust - For the sake of security and reliability!

Is it time to retire C and C++ for Rust in new programs? • The Register

The comments are interesting, and it seems C++ is now ISO std safe, but Rust isnt. MS & Google both admitting numerous bugs in their products, Windows & Chrome browser respectively caused by C/C++ (a comment with links). Most cpu’s support C, certainly its the go to language for micro systems and embedded systems, like the automotive industry.

Russinovich’s tweet seems to be prompted because Linux kernel is now embracing Rust.

So is .NET, a Garbage collecting collection of languages, not good enough for low level stuff?

And yet, no other language has a customisable template language which be extended in every way a program can be extended…

The things I’ve got the templates doing here by calling external DLL’s is impressive imo.

C is sort of one step up from assembler. If you know assembler you can see what they were doing in forming the language. As a result ‘doing the right thing’ and cleaning up was up to the programmer. Not good for business programs imo.

I agree, Clarions template system is amazing and under utilised in many ways. It also suffers from being tied to decisions made early on. but even so, even without external dlls so much can be achieved!

All these programming languages are written for a purpose, just look at how radically different SQL code is. Focusing on the main languages like assembler, C & C++, each is a step up in productivity and an attempt to minimise bugs.

I’m curious to know what you think these are?

Mostly the way that the values for the multiVaue tokens are referenced.
It would be reaaly nice to refer to an item in the hierarchy directly, like an array, instead of the #FIX etc

You can still acheive a huge amount but bits like that are just a little cluncky

I’ve created #Groups and pass values that way, dont forget you can use the * in the same way we use them in an app, ie pass by address.

#Group(%grpKeyFields,*%pKeyFields)

#Group(%grpParseEquate,*%pIO1,*%pIO2)
#!This calls a procedure which passes a csv string back which is parsed into the two vars from
#! "WhenAccepted( %grpPArseEquate(%EquateName,%EquateValue)"
#!
#Declare(%csvstring)
#Declare(%commaPos)
#Declare(%csvStringLen)
#Set(%csvString,clip(%pIO1) &','& clip(%pIO2))
#RunDll('MyRundll.dll','PROC3@FRsc',%csvString),release,win32
#Set(%commaPos,instring(',',%csvString,1,1))
#Set(%csvStringLen,Len(Clip(%csvString)))
#Set(%pIO1,Sub(%csvString,1,%commaPos-1))
#Set(%pIO2,Sub(%csvString,%commaPos+1,%csvString - (%commaPos + 1)))


#Group(%grpReadReg,*%pIOLine)
#!pIOLine format
#!Byte1  1 or 0 - Send debugview message from ReadReg.dll
#!Byte2  Seperator could be comma, semi colon or any other single digit alphanumeric.
#!Byte3+ Rest of the parameter is like GetReg seperated with the Byte2 seperator
#! Can use Microsoft HKLM, HKCU abbreviations or Clarion REG_LOCAL_MACHINE abbreviations. Both formats are supported.
#! 
#RunDll('C6ReadReg.dll','C6READREG@FPsc',%pIOLine),Release,Win32

Pretty much everything you can do in a clarion app, I can port to a template! :sunglasses:

I’ve got templates even sending their code to debugview,

and I have my debugview template working, which adds code to apps.