Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dict:dict() instead of dict() #2

Closed
wants to merge 1 commit into from

Conversation

mururu
Copy link

@mururu mururu commented Jun 28, 2015

No description provided.

@ethercrow
Copy link

+1

@@ -61,7 +61,7 @@
{
name :: if_name(), %% interface name
index :: non_neg_integer(), %% interface index
attr :: dict() %% attributes {atom(),term}
attr :: ditc:dict() %% attributes {atom(),term}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: ditc instead of dict

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, Thanks :)

@voluntas
Copy link

+1

@thecodeboss
Copy link

+1
This allows for compiling under Erlang OTP 18, where simply using dict() was deprecated.

@scohen
Copy link

scohen commented Oct 16, 2015

+1 We'd really like to use exometer in Erlang 18, and this is preventing us from doing so.

This was referenced Oct 16, 2015
@tonyrog
Copy link
Contributor

tonyrog commented Oct 17, 2015

I guess type term() is better since older version of Erlang will generate an error:
"referring to built-in type dict as a remote type; please take out the module name"
Sometime I have resolved this with a -define(DICT_T(), term()) and then used ?DICT_T() as type. Very ugly, but works on more than one version of OTP. Yes I do use older versions, still use R15. R15 is installed by default on many systems.

@tonyrog
Copy link
Contributor

tonyrog commented Oct 18, 2015

Me and ulf determined that term() type was the best choice right now. We will probably fix this when most of our platforms support dict:dict().

@tonyrog tonyrog closed this Oct 18, 2015
@scohen
Copy link

scohen commented Oct 18, 2015

I guess type term() is better since older version of Erlang will generate an error:
"referring to built-in type dict as a remote type; please take out the module name"

But netlink will not compile at all under 18.0.
In this case where you have a real incompatibility, ugly seems better than simply not working. The solution you presented seems to be something that could work under both circumstances. I urge you to reconsider.

@tonyrog
Copy link
Contributor

tonyrog commented Oct 18, 2015

Did the fix work or not?
I can not really parse what you are saying.

@scohen
Copy link

scohen commented Oct 18, 2015

I'm sorry, I thought you weren't going to fix this since you closed the PR.

I'll give it a shot and report back.

@mururu mururu deleted the deprecate-dict branch April 9, 2016 03:46
zyfmix pushed a commit to coam/Emysql that referenced this pull request Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants