-
Notifications
You must be signed in to change notification settings - Fork 181
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
Revival string list #470
Revival string list #470
Conversation
This comment has been minimized.
This comment has been minimized.
Explanation of forward and backward indexes: After inserting an element at Inserting an element at HEAD is like inserting at backward index is like the forward index of the reversed form of the list.
If you want to insert an element Currently there is NO function in the PR which converts integer index to forward index or backward index [not to be confused with fidx and bidx of PR] |
The API for the module to manipulate lists of strings has been discussed and this has resulted in the current implementation
There was a typo in some comments - corrected
…ib's string_type, provided suppport for allocatable character
03913ca
to
ecaa0bf
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Apart from reviewing code, you can also leave your opinion and feedback on the design. Coming up with a good design is the major challenge in this PR. The design that I have proposed has problems (I agree) one of them is: no one would prefer to use these forward and backward indexes over integer indexes. Having these I could have used positive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that CMakeLists.txt
and Makefile.manual
have not been set up to compile your code, so maybe I should focus on understanding the issues you want to discuss, not grammatical typos.
… using move function
This comment has been minimized.
This comment has been minimized.
I have 2 questions: 1). Should the module be renamed to |
Let me rename module from |
All changes have been made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could probably nitpick some more, but honestly this is a pretty good first implementation. I also don't want to jeopardize you completing GSoC, because IMO, this is more than sufficient to pass. Thanks for the hard work you put in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job. Thank you!
I approved it, pending some minor comments.
|
||
!> Constructor to convert chararray to stringlist | ||
!> Returns a new instance of type stringlist | ||
pure function new_stringlist_carray( array ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there not a constructor with array of type string_type
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After size
component was discarded it was causing ambiguous interfaces to provide support for string arrays. Which prompted me to remove it but I have added it again. Please have look at the commit 4b69e3d
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
Well, I don't completely agree with you.
But if you want to not mention a result, then I would suggest to remove the
section `Result value`, as done in
https://stdlib.fortran-lang.org/page/specs/stdlib_sorting.html#specifications-of-the-stdlib_sorting-procedures
. So there will be no confusion.
Le ven. 20 août 2021 à 15:53, Aman Godara ***@***.***> a
écrit :
… ***@***.**** commented on this pull request.
------------------------------
In doc/specs/stdlib_stringlist_type.md
<#470 (comment)>:
> +
+#### Class
+
+Pure subroutine.
+
+#### Argument
+
+- `idx`: [[stdlib_stringlist_type(module):stringlist_index_type(type)]].
+ This argument is intent(in).
+
+- `string`: Character scalar or [[stdlib_string_type(module):string_type(type)]].
+ This argument is intent(in).
+
+#### Result value
+
+No result.
If we mention this can it likely cause a reader to misunderstand this
subroutine as a function instead which is returning a new stringlist, and
a user might end using a syntax like this:
list = list%insert_at( fidx(10), "10th element")
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#470 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5RO7EKSSMDRRMWZBZ3GL3T5ZM57ANCNFSM5AYNZL5A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
7fe7cb6
to
2e5e822
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @aman-godara for this work. Really useful.
45d6198
to
2e5e822
Compare
Looks like |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aman-godara and reviewers! Unless there are objections let's merge this tomorrow.
a116c49
to
39297bd
Compare
This PR is based upon #311 by Arjen. Since 311 is very long, I decided to break it into parts and making it easier for others to review and for me to concentrate on one thing at a time.
How to Start Reviewing by gareth.
Previous discussions (in order of time):
Linked Issue: #268
string list: #269
string list new: #311
Time Line:
append operator(//)
stdlib
'sstring_type
, Provided support for allocatable character (character(len=:), allocatable
)stringlist
use onlystringlist_index_type
indexesget
) vs to_future_at_idxn (insert_at
)==
and/=
operatorinsert_at
,append
andprepend
Inviting: @zoziha, @St-Maxwell, others are welcomed as well.