AntelopeIO / cdt

Contract Development Toolkit (CDT) is a suite of tools to facilitate C/C++ development of contracts for Antelope blockchains
Other
28 stars 31 forks source link

Proposal: future deprecation of macros CONTRACT,ACTION,TABLE #133

Open DenisCarriere opened 1 year ago

DenisCarriere commented 1 year ago

Based on the experience with:

Additionally, macros are no able to handle:

As a developer looking at various code examples and seeing these macros, seems like it would cause more confusion and unclear direction on how to implement a proper smart contract.

Since there are still developers using Macros currently, would be best to announce a deprecation notice and later on at a later major release a removal.

  1. Deprecation warning (current)
  2. Removal at next major CDT release (future)
nsjames commented 1 year ago

Pros: I like the ease of them vs having to write/remember the expanded versions. Especially for new developers learning the stack.

Cons: Pretty clearly problematic from the issues listed above

I sent this ticket to the antelope dev chat so we can open up some discussion about them and see what directions should be taken.

poplexity commented 1 year ago

In addition to the more explicit issues described above, I'd be in favor of one way to do things just for consistency's sake. A developer might be familiar with one style and that means the other style can be confusing to read.

I'd also like to put name("bob") vs "bob"_n on the chopping block for the same reason, and personally prefer name("bob") for readability to anyone new to CDT.

stephenpdeos commented 1 year ago

Deprecation will be announced in upcoming CDT v4.0.0 release